1
0
mirror of synced 2024-11-25 02:34:24 +01:00

Improve the display of mat2 when no metadata are found

This should close #74
This commit is contained in:
jvoisin 2018-10-05 12:35:35 +02:00
parent 5e196ecef8
commit 8675706c93
2 changed files with 7 additions and 1 deletions

7
mat2
View File

@ -63,7 +63,12 @@ def show_meta(filename: str):
return
print("[+] Metadata for %s:" % filename)
for k, v in p.get_meta().items():
meta = p.get_meta().items()
if not meta:
print(" No metadata found")
return
for k, v in meta:
try: # FIXME this is ugly.
print(" %s: %s" % (k, v))
except UnicodeEncodeError:

View File

@ -81,6 +81,7 @@ class TestCleanFolder(unittest.TestCase):
stdout=subprocess.PIPE)
stdout, _ = proc.communicate()
self.assertNotIn(b'Comment: Created with GIMP', stdout)
self.assertIn(b'No metadata found', stdout)
shutil.rmtree('./tests/data/folder/')