diff options
author | Trent Piepho <tpiepho@gmail.com> | 2023-11-28 14:21:03 -0800 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-12-15 15:48:07 +1100 |
commit | f22e88611dda2f713ce9b8ae004915ae006105ba (patch) | |
tree | e01dfe5ff87938e74c10ab89a3ca0a8f5ef5f895 /py/makeqstrdefs.py | |
parent | 0d93392f10dc15cbd7e05931d0ddd7a5cc62c4b2 (diff) | |
download | micropython-f22e88611dda2f713ce9b8ae004915ae006105ba.tar.gz micropython-f22e88611dda2f713ce9b8ae004915ae006105ba.zip |
py/makeqstrdefs.py: Don't skip output for stale hash file.
In "cat" mode a "$output_file.hash" file is checked to see if the hash of
the new output is the same as the existing, and if so the output file isn't
updated.
However, it's possible that the output file has been deleted but the hash
file has not. In this case the output file is not created.
Change the logic so that a hash file is considered stale if there is no
output file and still create the output.
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
Diffstat (limited to 'py/makeqstrdefs.py')
-rw-r--r-- | py/makeqstrdefs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/makeqstrdefs.py b/py/makeqstrdefs.py index 57200e069c..bdc432d7dd 100644 --- a/py/makeqstrdefs.py +++ b/py/makeqstrdefs.py @@ -163,7 +163,7 @@ def cat_together(): mode_full = "Module registrations" elif args.mode == _MODE_ROOT_POINTER: mode_full = "Root pointer registrations" - if old_hash != new_hash: + if old_hash != new_hash or not os.path.exists(args.output_file): print(mode_full, "updated") try: # rename below might fail if file exists |