]> git.phdru.name Git - dotfiles.git/commitdiff
init.py: add an example of using cgitb.enable
authorOleg Broytman <phd@phdru.name>
Thu, 21 Apr 2016 19:34:50 +0000 (22:34 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 21 Apr 2016 19:34:50 +0000 (22:34 +0300)
lib/python/init.py

index 7ef24db2a9b9ce34c289300e31d1beff1aaf5dc8..1690a42ab9d2996a9fe35e3a681ea62942a53e91 100644 (file)
@@ -178,6 +178,14 @@ def init():
 
     sys.excepthook = excepthook
 
+    #try:
+    #    import cgitb
+    #except ImportError:
+    #    pass
+    #else:
+    #    # cgitb.enable() overrides sys.excepthook
+    #    cgitb.enable(format='text')
+
     # From Thomas Heller:
     # https://mail.python.org/pipermail/python-list/2001-April/099020.html