Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def dump_exif(f):
print("File", f, ":")
try:
info = exif.getexif(f)
except exif.ExifException as e:
print(" Error:", e)
else:
for k in sorted([k for k in info if isinstance(k, str)]) + sorted([k for k in info if not isinstance(k, str)]):
print(" ", k, ":", user_repr(info[k]))
print(" file creation time:", file_time_creation(f))