changeset 457:9fb231ad0bd2 elementtree

made to work (barely) with Dirks ISMI-Version
author casties
date Tue, 19 Jul 2011 11:54:06 +0200
parents b27a7d2f06ff
children 48b135b089c8
files documentViewer.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/documentViewer.py	Fri Jul 15 21:45:52 2011 +0200
+++ b/documentViewer.py	Tue Jul 19 11:54:06 2011 +0200
@@ -656,7 +656,8 @@
         logging.debug("documentViewer (getbibinfofromindexmeta) bibmap:"+repr(bibmap))
         logging.debug("documentViewer (getbibinfofromindexmeta) bibtype:"+repr(bibtype))
         # if there is no mapping bibmap is empty (mapping sometimes has empty fields)
-        if len(bibmap) > 0 and len(bibmap['author'][0]) > 0 or len(bibmap['title'][0]) > 0:
+        logging.debug("bibmap: %s"%repr(bibmap))
+        if len(bibmap) > 0 and bibmap.get('author',None) or bibmap.get('title',None):
             try:
                 docinfo['author']=getText(bib.find(bibmap['author'][0]))
             except: pass