]> granicus.if.org Git - zziplib/commitdiff
Merge pull request #72 from jelly/python3
authorGuido U. Draheim <guidod@gmx.de>
Sun, 4 Aug 2019 16:58:10 +0000 (18:58 +0200)
committerGuido Draheim <guidod@gmx.de>
Sun, 4 Aug 2019 17:15:38 +0000 (19:15 +0200)
docs/zzipdoc/commentmarkup.py
docs/zzipdoc/docbookdocument.py
docs/zzipdoc/functionlisthtmlpage.py
docs/zzipdoc/htmldocument.py
docs/zzipdoc/textfile.py

index c6824ee524f681a828baf772987b9290a9e204b4..21c1621a2c78172265c6f9b4f46761ffa8f3150e 100644 (file)
@@ -31,7 +31,7 @@ class CommentMarkup:
         comment = self.header.comment
         try:
             comment = self.header.get_otherlines()
-        except Exception:
+        except Exception as e:
             pass
         mode = ""
         text = ""
index d9a50fadcda76e847023e5097ccdbd79601e0099..3123a36d4967fd7b95a41bb67f432b8dc3fb8e37 100644 (file)
@@ -26,14 +26,14 @@ class DocbookDocument:
     def get_title(self):
         if self.title: return title
         try:   return self.text[0].get_title()
-        except Exception: pass
+        except Exception as e: pass
         return self.title
     def _xml_doctype(self, rootnode):
         return "<!DOCTYPE "+rootnode+self.docbook_dtd+">"
     def _xml_text(self, xml):
         """ accepts adapter objects with .xml_text() """
         try:   return xml.xml_text()
-        except Exception as e: print("DocbookDocument/text" + str(e)); pass
+        except Exception as e: print "DocbookDocument/text", e; pass
         return str(xml)
     def _fetch_rootnode(self, text):
         fetch = Match(r"^[^<>]*<(\w+)\b")
index acabdd4c70243650b6a5ffa038eb01932e2faef2..a84f04cd95fe8293012bb7823de483ea41d2afaa 100644 (file)
@@ -45,7 +45,7 @@ class FunctionListHtmlPage:
             callspec = entry.head_get_callspec()
             head_text = ("<code><b><function>"+namespec+"</function></b>"
                          +callspec+" : "+prespec+"</code>")
-        except Exception:
+        except Exception as e:
             pass
         try:
             extraline = ""
@@ -58,7 +58,7 @@ class FunctionListHtmlPage:
                              '<em><small>'+filename+'</small></em>'+
                              '</td></table>')
             body_text = extraline + body_text
-        except Exception:
+        except Exception as e:
             pass
         def link(text):
             return (text & Match("<function>(\w*)</function>")
index ca6141d574e586dccd9b2f2c7262854185b1d0e7..0466b9dfe0e40f9713b2eeb0ec6f4ab4d9d87978 100644 (file)
@@ -31,12 +31,12 @@ class HtmlDocument:
     def get_title(self):
         if self.title: return self.title
         try:   return self.text[0].get_title()
-        except Exception: pass
+        except Exception as e: pass
         return self.title
     def _html_meta(self, meta):
         """ accepts adapter objects with .html_meta() """
         try:   return meta.html_meta()
-        except Exception: pass
+        except Exception as e: pass
         return str(meta)
     def _html_style(self, style):
         """ accepts adapter objects with .html_style() and .xml_style() """
@@ -65,7 +65,7 @@ class HtmlDocument:
                 self.navi = fd.read()
                 fd.close()
                 return self.navi
-            except Exception:
+            except Exception as e:
                 pass
         return None
     def html_header(self):
index 0b7bc9fa29a236ad6c7b3998bb8765b11d6c462b..1c8b935db584ab7547bccb200da2bdb45547cd0c 100644 (file)
@@ -17,7 +17,7 @@ class TextFile:
             self.src_text = fd.read()
             fd.close()
             return True
-        except IOError:
+        except IOError as e:
             pass
         return False
     def assert_src_text(self):