# HG changeset patch # User dwinter # Date 1367339658 -7200 # Node ID 602b6e46b176637d37b62c916802ee7b3ba87a8f # Parent 9dbb9354abbe6fa5af5432a10c0a06c4f2f38e58 error handling bei falscher suche diff -r 9dbb9354abbe -r 602b6e46b176 zopePubmanConnector.py --- a/zopePubmanConnector.py Mon Apr 29 15:58:16 2013 +0200 +++ b/zopePubmanConnector.py Tue Apr 30 18:34:18 2013 +0200 @@ -77,7 +77,7 @@ logging.debug(cn) resp, content = h.request(cn) - logging.debug(content) + ET.register_namespace("dcterms", "http://purl.org/dc/terms/") @@ -148,9 +148,12 @@ resp, content = h.request(cn%query) ET.register_namespace("dcterms", "http://purl.org/dc/terms/") - - root = ET.fromstring(content) + try: + root = ET.fromstring(content) + except: + logging.error("Couldn't parse content of:%s"%(cn%query)) + return {} #