]> granicus.if.org Git - zziplib/commitdiff
zzipdoc: convert use of print statement
authorPatrick Steinhardt <ps@pks.im>
Sun, 4 Aug 2019 18:49:37 +0000 (20:49 +0200)
committerPatrick Steinhardt <ps@pks.im>
Sun, 4 Aug 2019 18:52:40 +0000 (20:52 +0200)
Commit 5b660a3 (Merge pull request #72 from jelly/python3, 2019-08-04)
introduced a conversion to use new-style Python exceptions.
The conversion introduced a new print statements, though, breaking
compatibility with Python 3 again.

Convert the statement to use the print function, instead.

docs/zzipdoc/docbookdocument.py

index 3123a36d4967fd7b95a41bb67f432b8dc3fb8e37..7356c3a0db983e75acc56197148933eb62f36fee 100644 (file)
@@ -33,7 +33,7 @@ class DocbookDocument:
     def _xml_text(self, xml):
         """ accepts adapter objects with .xml_text() """
         try:   return xml.xml_text()
-        except Exception as e: print "DocbookDocument/text", e; pass
+        except Exception as e: print("DocbookDocument/text " + e); pass
         return str(xml)
     def _fetch_rootnode(self, text):
         fetch = Match(r"^[^<>]*<(\w+)\b")