comment = self.header.comment
try:
comment = self.header.get_otherlines()
- except Exception:
+ except Exception as e:
pass
mode = ""
text = ""
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")
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 = ""
'<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>")
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() """
self.navi = fd.read()
fd.close()
return self.navi
- except Exception:
+ except Exception as e:
pass
return None
def html_header(self):
self.src_text = fd.read()
fd.close()
return True
- except IOError:
+ except IOError as e:
pass
return False
def assert_src_text(self):