summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/SCons/scons-local/SCons/Variables/__init__.py')
-rw-r--r--3rdParty/SCons/scons-local/SCons/Variables/__init__.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/3rdParty/SCons/scons-local/SCons/Variables/__init__.py b/3rdParty/SCons/scons-local/SCons/Variables/__init__.py
index 89ba227..469d3c0 100644
--- a/3rdParty/SCons/scons-local/SCons/Variables/__init__.py
+++ b/3rdParty/SCons/scons-local/SCons/Variables/__init__.py
@@ -5,7 +5,7 @@ customizable variables to an SCons build.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ customizable variables to an SCons build.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Variables/__init__.py 4043 2009/02/23 09:06:45 scons"
+__revision__ = "src/engine/SCons/Variables/__init__.py 4761 2010/04/04 14:04:44 bdeegan"
import os.path
import string
@@ -95,6 +95,14 @@ class Variables:
option.converter = converter
self.options.append(option)
+
+ # options might be added after the 'unknown' dict has been set up,
+ # so we remove the key and all its aliases from that dict
+ for alias in list(option.aliases) + [ option.key ]:
+ # TODO(1.5)
+ #if alias in self.unknown:
+ if alias in self.unknown.keys():
+ del self.unknown[alias]
def keys(self):
"""
@@ -166,7 +174,7 @@ class Variables:
sys.path.insert(0, dir)
try:
values['__name__'] = filename
- execfile(filename, {}, values)
+ exec open(filename, 'rU').read() in {}, values
finally:
if dir:
del sys.path[0]
@@ -179,7 +187,7 @@ class Variables:
for arg, value in args.items():
added = False
for option in self.options:
- if arg in option.aliases + [ option.key ]:
+ if arg in list(option.aliases) + [ option.key ]:
values[option.key] = value
added = True
if not added: