From 63bd7c04bdc11cfd6d5805005b4e421f832106bb Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Wed, 25 Jan 2012 23:05:47 +0100 Subject: Acts on feedback from Chris - Added EXIF tests - Removed pdb from image processing "ifmain" - Fixed comment typo in image processing - Removed unused import in tools.exif --- mediagoblin/tools/exif.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'mediagoblin/tools') diff --git a/mediagoblin/tools/exif.py b/mediagoblin/tools/exif.py index 445907ba..3c1aebe5 100644 --- a/mediagoblin/tools/exif.py +++ b/mediagoblin/tools/exif.py @@ -18,8 +18,6 @@ from mediagoblin.tools.extlib.EXIF import process_file, Ratio from mediagoblin.processing import BadMediaFail from mediagoblin.tools.translate import pass_to_ugettext as _ -from collections import OrderedDict - # A list of tags that should be stored for faster access USEFUL_TAGS = [ 'Image Make', @@ -73,8 +71,7 @@ def extract_exif(filename): def clean_exif(exif): ''' - Clean the result from anyt -hing the database cannot handle + Clean the result from anything the database cannot handle ''' # Discard any JPEG thumbnail, for database compatibility # and that I cannot see a case when we would use it. @@ -129,11 +126,11 @@ def get_gps_data(tags): """ Processes EXIF data returned by EXIF.py """ - if not 'Image GPSInfo' in tags: - return False - gps_data = {} + if not 'Image GPSInfo' in tags: + return gps_data + try: dms_data = { 'latitude': tags['GPS GPSLatitude'], -- cgit v1.2.3