Commits

Steven Knight  committed 6c8fbc5

Fix Python 2.1 warning

  • Participants
  • Parent commits 96f0e9c

Comments (0)

Files changed (2)

File src/scons.py

     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

File test/errors.py

   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