changeset 161:8eee2fa838cf

text_x_arnica: fixed EXIF date output
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 12 Jul 2008 15:29:58 +0200
parents 290d4eea1c0c
children c3e0ae8ba0a0
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Sat Jul 12 15:08:21 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Sat Jul 12 15:29:58 2008 +0200
@@ -173,10 +173,9 @@
         id_file = open(file_name, 'rb')
         tags = EXIF.process_file(id_file, 'DateTimeOriginal')
         id_file.close()
-        # ToDo change to "in dict"
-        if tags.has_key('EXIF DateTimeOriginal'):
+        if 'EXIF DateTimeOriginal' in tags:
             date = str(tags['EXIF DateTimeOriginal'])
-            date = self.formatter.text(date.replace(':', '-', 2))
+            date = date.replace(':', '-', 2)
     return date
 
 def _get_files(request, pagename):
@@ -323,7 +322,7 @@
         text = ''
         if self.show_date:
             text = '<div class="html-show-date">%(this_exif_date)s</div>' % {
-                "this_exif_date": self.exif_date[idx]}
+                "this_exif_date": self.formatter.text(self.exif_date[idx])}
         return text
 
     def html_show_alias(self, idx):