--- documentViewer/documentViewer.py 2007/06/14 16:07:21 1.28 +++ documentViewer/documentViewer.py 2007/06/15 14:16:27 1.29 @@ -32,7 +32,7 @@ def getInt(number, default=0): try: return int(number) except: - return default + return int(default) def getTextFromNode(nodename): """get the cdata content of a node""" @@ -439,9 +439,18 @@ class documentViewer(Folder): """gets the bibliographical information from the preseantion entry in texttools """ dom=self.getPresentationInfoXML(url) - docinfo['author']=getTextFromNode(dom.xpath("//author")[0]) - docinfo['title']=getTextFromNode(dom.xpath("//title")[0]) - #docinfo['year']=getTextFromNode(dom.xpath("//date")[0]) + try: + docinfo['author']=getTextFromNode(dom.xpath("//author")[0]) + except: + pass + try: + docinfo['title']=getTextFromNode(dom.xpath("//title")[0]) + except: + pass + try: + docinfo['year']=getTextFromNode(dom.xpath("//date")[0]) + except: + pass return docinfo def getDocinfoFromImagePath(self,path,docinfo=None):