[Zope-CVS] CVS: Products/ExternalEditor - zopeedit.py:1.12
Casey Duncan
casey@zope.com
Tue, 11 Jun 2002 09:27:18 -0400
Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv1321
Modified Files:
zopeedit.py
Log Message:
Better diagnostics for zope_request
=== Products/ExternalEditor/zopeedit.py 1.11 => 1.12 ===
import sys, os
from os import path
+import traceback
from tempfile import mktemp
from ConfigParser import ConfigParser
from httplib import HTTPConnection, HTTPSConnection
@@ -354,8 +355,8 @@
# On error return a null response with error info
class NullResponse:
def getheader(n,d): return d
- def read(self): return '(No Response From Server)\n\n%s' \
- % sys.exc_info[2]
+ def read(self):
+ return '(No Response From Server)'
response = NullResponse()
response.reason = sys.exc_info()[1]
@@ -363,6 +364,9 @@
response.status, response.reason = response.reason
except:
response.status = 0
+
+ sys.stderr.write('\n -- Zope Request Traceback --\n')
+ traceback.print_exc(file=sys.stderr)
return response
title = 'Zope External Editor'