Commit 8675706c authored by jvoisin's avatar jvoisin

Improve the display of mat2 when no metadata are found

This should close #74
parent 5e196ece
Pipeline #19356 passed with stages
in 4 minutes and 12 seconds
......@@ -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:
......
......@@ -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/')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment