changeset 172:a2c26bbd9ed8

text_x_arnica: renamed some vars in get_exif_info
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 14 Jul 2008 19:52:26 +0200
parents 6c5af220a85a
children f5cdee2715a3
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Mon Jul 14 19:36:57 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Mon Jul 14 19:52:26 2008 +0200
@@ -170,10 +170,10 @@
     """
     date = "--"
     if wikiutil.isPicture(file_name):
-        # XXX what happens if it is not a jpeg file
-        id_file = open(file_name, 'rb')
-        tags = EXIF.process_file(id_file, 'DateTimeOriginal')
-        id_file.close()
+        # if there is no exif data available tags is an empty dict
+        exif_file = open(file_name, 'rb')
+        tags = EXIF.process_file(exif_file, 'DateTimeOriginal')
+        exif_file.close()
         if 'EXIF DateTimeOriginal' in tags:
             date = str(tags['EXIF DateTimeOriginal'])
             date = date.replace(':', '-', 2)