Mercurial > hg > documentViewer
diff MpdlXmlTextServer.py @ 409:f7d73ea4b38b
quick fix for broken texturlpath
author | casties |
---|---|
date | Thu, 25 Nov 2010 10:03:50 +0100 |
parents | 1cea48640992 |
children | 691f0c341b33 |
line wrap: on
line diff
--- a/MpdlXmlTextServer.py Wed Nov 24 17:01:26 2010 +0100 +++ b/MpdlXmlTextServer.py Thu Nov 25 10:03:50 2010 +0100 @@ -143,7 +143,10 @@ def getGisPlaces(self, docinfo=None, pageinfo=None): """ Show all Gis Places of whole Page""" xpath='//place' - docpath = docinfo['textURLPath'] + docpath = docinfo.get('textURLPath',None) + if not docpath: + return None + url = docinfo['url'] selfurl = self.absolute_url() pn = pageinfo['current'] @@ -198,7 +201,10 @@ def getOrigPages (self, docinfo=None, pageinfo=None): """Show original page """ - docpath = docinfo['textURLPath'] + docpath = docinfo.get('textURLPath',None) + if not docpath: + return None + logging.debug ("docinfo['textURLPath']=%s"%(docinfo['textURLPath'])) #url = docinfo['url'] selfurl = self.absolute_url()