summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1999-01-07 03:27:12 +0000
committerbwarsaw1999-01-07 03:27:12 +0000
commit670dceac370bf9e81324dc28b189fc334bdf63b4 (patch)
tree1f1413611502cd5bf1cc95cbd4431e1ce2d1277d
parent5196e8f0df045be91e3fb77febf3ca7e5a263ae4 (diff)
downloadmailman-670dceac370bf9e81324dc28b189fc334bdf63b4.tar.gz
mailman-670dceac370bf9e81324dc28b189fc334bdf63b4.tar.zst
mailman-670dceac370bf9e81324dc28b189fc334bdf63b4.zip
print_traceback(): A few changes to get the Mailman version number
into both the error log and the HTML page.
Diffstat (limited to '')
-rw-r--r--scripts/driver12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/driver b/scripts/driver
index 5ba617b47..8b5c9a2a5 100644
--- a/scripts/driver
+++ b/scripts/driver
@@ -121,8 +121,14 @@ def print_traceback(logfp=None):
import traceback
except ImportError:
traceback = None
+ try:
+ from Mailman.mm_cfg import VERSION
+ except ImportError:
+ VERSION = '<undetermined>'
# write to the log file first
+ logfp.write('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n')
+ logfp.write('[----- Mailman Version: %s -----]\n' % VERSION)
logfp.write('[----- Traceback ------]\n')
if traceback:
traceback.print_exc(file=logfp)
@@ -134,6 +140,8 @@ def print_traceback(logfp=None):
print """\
Content-type: text/html
+<head><title>Bug in Mailman version %(VERSION)s</title></head>
+<body><h2>Bug in Mailman version %(VERSION)s</h2>
<p><h3>We're sorry, we hit a bug!</h3>
<p>If you would like to help us identify the problem, please
@@ -142,13 +150,13 @@ a description of what happened. Thanks!
<h4>Traceback:</h4>
<p><pre>
-"""
+""" % locals()
if traceback:
traceback.print_exc(file=sys.stdout)
else:
print '[failed to import module traceback]'
print '[exc: %s, var: %s]' % sys.exc_info()[0:2]
- print '\n\n</pre>'
+ print '\n\n</pre></body>'