web/views/sparql.py
changeset 8695 358d8bed9626
parent 7460 2455cdbeadca
child 8696 0bb18407c053
--- a/web/views/sparql.py	Thu Feb 14 15:39:23 2013 +0100
+++ b/web/views/sparql.py	Thu Feb 14 15:38:25 2013 +0100
@@ -58,11 +58,11 @@
         if sparql:
             try:
                 qinfo = Sparql2rqlTranslator(self._cw.vreg.schema).translate(sparql)
-            except TypeResolverException, exc:
+            except TypeResolverException as exc:
                 self.w(self._cw._('can not resolve entity types:') + u' ' + unicode(exc))
             except UnsupportedQuery:
                 self.w(self._cw._('we are not yet ready to handle this query'))
-            except xy.UnsupportedVocabulary, exc:
+            except xy.UnsupportedVocabulary as exc:
                 self.w(self._cw._('unknown vocabulary:') + u' ' + unicode(exc))
             else:
                 rql, args = qinfo.finalize()