]> granicus.if.org Git - python/commitdiff
the usual
authorGuido van Rossum <guido@python.org>
Tue, 30 Dec 1997 04:20:58 +0000 (04:20 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 30 Dec 1997 04:20:58 +0000 (04:20 +0000)
Lib/dos-8x3/cgihttps.py
Lib/dos-8x3/test_zli.py

index 85e172172193a169a5d94a0acab72a52f197ba47..b40edbced47e3343e9946cdf6856af3e31f0c3b5 100755 (executable)
@@ -148,8 +148,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
            if ua:
                env['HTTP_USER_AGENT'] = ua
            # XXX Other HTTP_* headers
-           import regsub
-           decoded_query = regsub.gsub('+', ' ', query)
+           decoded_query = string.replace(query, '+', ' ')
            try:
                os.setuid(nobody)
            except os.error:
index 62c26048eb8e2f71afc1b7738b0af50af888e46f..72dbcfa20a16184c613a4b38ea2b74d3e075792c 100644 (file)
@@ -3,8 +3,11 @@ import sys
 import imp
 import string
 
-t = imp.find_module('test_zlib')
-file = t[0]
+try:
+    t = imp.find_module('test_zlib')
+    file = t[0]
+except ImportError:
+    file = open(__file__)
 buf = file.read() * 8
 file.close()