diff options
Diffstat (limited to 'src/engine/SCons/Options/__init__.py')
-rw-r--r-- | src/engine/SCons/Options/__init__.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/SCons/Options/__init__.py b/src/engine/SCons/Options/__init__.py index ebd6052..e2ad80f 100644 --- a/src/engine/SCons/Options/__init__.py +++ b/src/engine/SCons/Options/__init__.py @@ -50,7 +50,7 @@ class Options: Holds all the options, updates the environment with the variables, and renders the help text. """ - def __init__(self, files=None, args={}, is_global=1): + def __init__(self, files=[], args={}, is_global=1): """ files - [optional] List of option configuration files to load (backward compatibility) If a single string is passed it is @@ -58,11 +58,12 @@ class Options: """ self.options = [] self.args = args - self.files = None - if SCons.Util.is_String(files): - self.files = [ files ] - elif files: - self.files = files + if not SCons.Util.is_List(files): + if files: + files = [ files ] + else: + files = [] + self.files = files # create the singleton instance if is_global: @@ -155,10 +156,9 @@ class Options: values[option.key] = option.default # next set the value specified in the options file - if self.files: - for filename in self.files: - if os.path.exists(filename): - execfile(filename, values) + for filename in self.files: + if os.path.exists(filename): + execfile(filename, values) # finally set the values specified on the command line if args is None: |