forked from Imagelibrary/littlefs
scripts: crc32c.py/parity.py: Show string with -s/--string
This matches the behavior of paths and helps figure out which string is associated with which crc32c/parity when checksumming multiple strings: $ ./scripts/crc32c.py -s hi hello f59dd9c2 hi 9a71bb4c hello It also might help clear up confusion if someone forgets to quote a string with spaces inside it.
This commit is contained in:
@@ -47,7 +47,7 @@ def main(paths, **args):
|
||||
# interpret as strings
|
||||
elif args.get('string'):
|
||||
for path in paths:
|
||||
print('%08x' % crc32c(path.encode('utf8')))
|
||||
print('%08x %s' % (crc32c(path.encode('utf8')), path))
|
||||
|
||||
# default to interpreting as paths
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user