1
0
mirror of synced 2024-11-22 01:04:23 +01:00

Output metadata in a sorted fashion

This commit is contained in:
jvoisin 2018-10-18 21:17:12 +02:00
parent d4c050a738
commit 5896387ade

5
mat2
View File

@ -77,9 +77,10 @@ def __print_meta(filename: str, metadata: dict, depth: int=1):
print("[%s] Metadata for %s:" % ('+'*depth, filename))
for k, v in metadata.items():
for (k,v) in sorted(metadata.items()):
if isinstance(v, dict):
return __print_meta(k, v, depth+1)
__print_meta(k, v, depth+1)
continue
try: # FIXME this is ugly.
print(padding + " %s: %s" % (k, v))
except UnicodeEncodeError: