From 016880229a369a3fb419f3eed28b6db7c342fe71 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 12 Aug 2007 00:43:29 +0000 Subject: Kill execfile(), use exec() instead --- Lib/CGIHTTPServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/CGIHTTPServer.py') 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 -- cgit v1.2.1