From 5e746bfdd3f7771601fe2ca02786ad70ae05c0a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Thu, 21 Feb 2013 11:30:23 +0100 Subject: [PATCH] simplified clean_exif --- mediagoblin/tools/exif.py | 8 ++------ 1 file 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): -- 2.25.1