Skip to content

Commit

Permalink
optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jul 19, 2016
1 parent f46d73c commit 83ea04d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/image_processing.py
Expand Up @@ -66,8 +66,6 @@ def _fill_exif_tag_names(self):

def filter_exif(self, exif, whitelist):
"""Filter EXIF data as described in the documentation."""
self._fill_exif_tag_names()
exif = exif.copy() # Don't modify in-place, it's rude

# Scenario 1: keep everything
if whitelist == {'*': '*'}:
Expand All @@ -78,6 +76,8 @@ def filter_exif(self, exif, whitelist):
return None

# Scenario 3: keep some
self._fill_exif_tag_names()
exif = exif.copy() # Don't modify in-place, it's rude
for k in list(exif.keys()):
if type(exif[k]) != dict:
pass # At least thumbnails have no fields
Expand Down

0 comments on commit 83ea04d

Please sign in to comment.