aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/exif.py
diff options
context:
space:
mode:
authorAndrás Veres-Szentkirályi <vsza@vsza.hu>2013-02-21 11:30:23 +0100
committerJoar Wandborg <joar@wandborg.se>2013-02-22 22:24:29 +0100
commit5e746bfdd3f7771601fe2ca02786ad70ae05c0a0 (patch)
treec3d6c3b74c3b8d669348354652be42edd7402f7f /mediagoblin/tools/exif.py
parent9aff782ba7ae00644bf3cb95c4140f2a84bd1001 (diff)
downloadmediagoblin-5e746bfdd3f7771601fe2ca02786ad70ae05c0a0.tar.lz
mediagoblin-5e746bfdd3f7771601fe2ca02786ad70ae05c0a0.tar.xz
mediagoblin-5e746bfdd3f7771601fe2ca02786ad70ae05c0a0.zip
simplified clean_exif
Diffstat (limited to 'mediagoblin/tools/exif.py')
-rw-r--r--mediagoblin/tools/exif.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/mediagoblin/tools/exif.py b/mediagoblin/tools/exif.py
index b1da1833..ac111694 100644
--- a/mediagoblin/tools/exif.py
+++ b/mediagoblin/tools/exif.py
@@ -92,12 +92,8 @@ def clean_exif(exif):
'JPEGThumbnail',
'Thumbnail JPEGInterchangeFormat']
- clean_exif = {}
-
- for key, value in exif.items():
- if not key in disabled_tags:
- clean_exif[key] = _ifd_tag_to_dict(value)
- return clean_exif
+ return dict((key, _ifd_tag_to_dict(value)) for (key, value)
+ in exif.iteritems() if key not in disabled_tags)
def _ifd_tag_to_dict(tag):