Fix Python 2.1 warning
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 13 Sep 2001 02:03:37 +0000 (02:03 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 13 Sep 2001 02:03:37 +0000 (02:03 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@46 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/scons.py
test/errors.py

index 16fb0bf33177f1737f0dd614d768c47784b8b98f..b08b786817563f9bb535941382bff36f116bbde6 100644 (file)
@@ -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
index a4b05cc622a7557015b10c7e4e28e961a8ea993f..54e26b991c2dfbfeee82c4e502a9af95e8f417ea 100644 (file)
@@ -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