1
0
Fork 0

Output metadata in a sorted fashion

This commit is contained in:
jvoisin 2018-10-18 21:17:12 +02:00
parent d4c050a738
commit 5896387ade
1 changed files with 3 additions and 2 deletions

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: