SVN: r25429 - trunk/quixote

Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Mon, 25 Oct 2004 18:00:32 -0400
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: nascheme
Date: 2004-10-25 18:00:24 -0400 (Mon, 25 Oct 2004)
New Revision: 25429

Modified:
   trunk/quixote/publish.py
Log:
Remove debug prints.  Import cgitb without try/except.


Modified: trunk/quixote/publish.py
===================================================================
--- trunk/quixote/publish.py	2004-10-25 21:25:00 UTC (rev 25428)
+++ trunk/quixote/publish.py	2004-10-25 22:00:24 UTC (rev 25429)
@@ -11,6 +11,7 @@
 import time, types, re, warnings
 import struct
 import urlparse
+import cgitb
 try:
     import zlib # for COMPRESS_PAGES option
 except ImportError:
@@ -26,11 +27,6 @@
 from quixote.http_response import HTTPResponse, Stream
 from quixote.logger import DefaultLogger
 
-try:
-    import cgitb                        # Only available in Python 2.2
-except ImportError:
-    cgitb = None
-
 def _get_module(name):
     """Get a module object by name."""
     __import__(name)
@@ -164,7 +160,6 @@
         should return a string object which will be used as the result of
         the request.
         """
-        print 'Publisher finish_interrupted_request'
         if not self.config.display_exceptions and exc.private_msg:
             exc.private_msg = None # hide it
         request = get_request()
@@ -199,7 +194,7 @@
             # secure (and cryptic) page.
             request.response.set_header("Content-Type", "text/html")
             user_error_msg = self._generate_internal_error(request)
-        elif self.config.display_exceptions == 'html' and cgitb is not None:
+        elif self.config.display_exceptions == 'html':
             # Generate a spiffy HTML display using cgitb
             request.response.set_header("Content-Type", "text/html")
             user_error_msg = self._generate_cgitb_error(request,
@@ -419,7 +414,6 @@
         self.session_mgr.commit_changes(session)
 
     def finish_interrupted_request(self, exc):
-        print 'SessionPublisher finish_interrupted_request'
         output = Publisher.finish_interrupted_request(self, exc)
 
         # commit the current transaction so that any changes to the