# HG changeset patch # User casties # Date 1350048877 -7200 # Node ID be21250420beb961c0df3bcadc4f93f8a806d9b9 # Parent 6949355741773d063ac6ec39c54d6d91303b42ea MpdlXmlTextServer more resilient to non-existing doc-info.xql diff -r 694935574177 -r be21250420be MpdlXmlTextServer.py --- a/MpdlXmlTextServer.py Thu Oct 11 18:27:14 2012 +0200 +++ b/MpdlXmlTextServer.py Fri Oct 12 15:34:37 2012 +0200 @@ -107,15 +107,20 @@ if docpath is None: logging.error("getTextInfo: no textURLPath!") return docinfo - - # we need to set a result set size - pagesize = 10000 - pn = 1 - # fetch docinfo - pagexml = self.getServerData("doc-info.xql","document=%s&info=%s&pageSize=%s&pn=%s"%(docpath,mode,pagesize,pn)) - dom = ET.fromstring(pagexml) - # all info in tag - doc = dom.find("document") + + try: + # we need to set a result set size + pagesize = 10000 + pn = 1 + # fetch docinfo + pagexml = self.getServerData("doc-info.xql","document=%s&info=%s&pageSize=%s&pn=%s"%(docpath,mode,pagesize,pn)) + dom = ET.fromstring(pagexml) + # all info in tag + doc = dom.find("document") + except Exception, e: + logging.error("getTextInfo: Error getting data: %s"%e) + return docinfo + if doc is None: logging.error("getTextInfo: unable to find document-tag!") else: diff -r 694935574177 -r be21250420be version.txt --- a/version.txt Thu Oct 11 18:27:14 2012 +0200 +++ b/version.txt Fri Oct 12 15:34:37 2012 +0200 @@ -1,1 +1,1 @@ -DocumentViewer 2.2.4 \ No newline at end of file +DocumentViewer 2.2.5 \ No newline at end of file