Skip to content

Commit

Permalink
fix obvious bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jul 18, 2016
1 parent 794495e commit 5c9d11e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nikola/image_processing.py
Expand Up @@ -61,7 +61,7 @@ def _fill_exif_tag_names(self):
# Convert whitelisted tag names to numeric values
if not EXIF_TAG_NAMES:
for ifd in piexif.TAGS:
for tag, data in ifd.items():
for tag, data in piexif.TAGS[ifd].items():
EXIF_TAG_NAMES[tag] = data['name']

def filter_exif(self, exif, whitelist):
Expand All @@ -80,6 +80,8 @@ def filter_exif(self, exif, whitelist):

# Scenario 3: keep some
for k in exif:
if type(exif[k]) != dict:
pass # At least thumbnails have no fields
if k not in whitelist:
exif.pop(k) # Not whitelisted, remove
elif k in whitelist and whitelist[k] == '*':
Expand Down

0 comments on commit 5c9d11e

Please sign in to comment.