projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64376dc
)
close file properly and remove unneeded variable
author
András Veres-Szentkirályi
<vsza@vsza.hu>
Thu, 21 Feb 2013 10:29:24 +0000
(11:29 +0100)
committer
Joar Wandborg
<joar@wandborg.se>
Fri, 22 Feb 2013 21:24:29 +0000
(22:24 +0100)
mediagoblin/tools/exif.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/tools/exif.py
b/mediagoblin/tools/exif.py
index b8b4d9e61c5f94ac895b94d7745e66eeea6f80fc..b1da183373956d72c8679e0ea2091bb8c3cf0986 100644
(file)
--- a/
mediagoblin/tools/exif.py
+++ b/
mediagoblin/tools/exif.py
@@
-73,16
+73,12
@@
def extract_exif(filename):
"""
Returns EXIF tags found in file at ``filename``
"""
- exif_tags = {}
-
try:
- image = open(filename)
-
exif_tags =
process_file(image, details=False)
+ with file(filename) as image:
+
return
process_file(image, details=False)
except IOError:
raise BadMediaFail(_('Could not read the image file.'))
- return exif_tags
-
def clean_exif(exif):
'''