summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorbwarsaw1998-07-22 21:32:34 +0000
committerbwarsaw1998-07-22 21:32:34 +0000
commitc81d989f66a87460fb98ac5a154102995a4d527c (patch)
tree2b14c28e105fd7a0bf1d89090e848a0228c8bb63 /scripts
parentcd79e27fb5734e98146264bc722a0a91c574aa24 (diff)
downloadmailman-c81d989f66a87460fb98ac5a154102995a4d527c.tar.gz
mailman-c81d989f66a87460fb98ac5a154102995a4d527c.tar.zst
mailman-c81d989f66a87460fb98ac5a154102995a4d527c.zip
Diffstat (limited to 'scripts')
-rw-r--r--scripts/driver21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/driver b/scripts/driver
index 55cd85090..8bc207601 100644
--- a/scripts/driver
+++ b/scripts/driver
@@ -17,6 +17,27 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Useful for debugging. When an error occurs, this attaches the file name to
+# the exception string and re-raises (using the bogus Python 1.5 semantics)
+# this may be unnecessary in Python 1.5.2
+
+## realopen = open
+## def open(filename, mode='r', bufsize=-1, realopen=realopen):
+## try:
+## return realopen(filename, mode, bufsize)
+## except IOError, e:
+## strerror = e.strerror + ': ' + filename
+## e.strerror = strerror
+## e.args = (e.args[0], strerror)
+## # Python 1.5
+## import sys
+## raise e, None, sys.exc_info()[2]
+## # Python 1.5.1
+## #raise
+## import __builtin__
+## __builtin__.__dict__['open'] = open
+
+
# This standard driver script is used to run CGI programs, wrapped in code
# that catches errors, and displays them as HTML. This guarantees that