From 911c3d0ea7a588fef3ebe4897395b2243c3ef60e Mon Sep 17 00:00:00 2001 From: stevenknight Date: Thu, 13 Sep 2001 02:03:37 +0000 Subject: [PATCH] Fix Python 2.1 warning git-svn-id: http://scons.tigris.org/svn/scons/trunk@46 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/scons.py | 4 ++-- test/errors.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scons.py b/src/scons.py index 16fb0bf3..b08b7868 100644 --- a/src/scons.py +++ b/src/scons.py @@ -517,14 +517,14 @@ def main(): while Scripts: file, Scripts = Scripts[0], Scripts[1:] if file == "-": - exec sys.stdin + exec sys.stdin in globals() else: try: f = open(file, "r") except IOError, s: sys.stderr.write("Ignoring missing script '%s'\n" % file) else: - exec f + exec f in globals() if local_help: # They specified -h, but there was no Help() inside the diff --git a/test/errors.py b/test/errors.py index a4b05cc6..54e26b99 100644 --- a/test/errors.py +++ b/test/errors.py @@ -49,7 +49,7 @@ expect = r"""Traceback \((most recent call|innermost) last\): File "%s", line \d+, in \? main\(\) File "%s", line \d+, in main - exec f + exec f in globals\(\) File "SConstruct3", line \d+, in \? raise InternalError, 'error inside' InternalError: error inside -- 2.26.2