diff options
Diffstat (limited to 'Lib/CGIHTTPServer.py')
-rw-r--r-- | Lib/CGIHTTPServer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py index a2d809c14c..828b092496 100644 --- a/Lib/CGIHTTPServer.py +++ b/Lib/CGIHTTPServer.py @@ -316,7 +316,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): sys.argv.append(decoded_query) sys.stdout = self.wfile sys.stdin = self.rfile - execfile(scriptfile, {"__name__": "__main__"}) + exec(open(scriptfile).read(), {"__name__": "__main__"}) finally: sys.argv = save_argv sys.stdin = save_stdin |