diff options
Diffstat (limited to 'src/engine/SCons/Action.py')
-rw-r--r-- | src/engine/SCons/Action.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index c222d26..79fdd2c 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -266,11 +266,17 @@ class ActionBase: try: cwd = kw['dir'] - except: + except KeyError: cwd = None else: del kw['dir'] + def rstr(x): + try: + return x.rstr() + except AttributeError: + return str(x) + if kw.has_key('target'): t = kw['target'] del kw['target'] @@ -280,7 +286,7 @@ class ActionBase: cwd = t[0].cwd except (IndexError, AttributeError): pass - dict['TARGETS'] = SCons.Util.PathList(map(os.path.normpath, map(str, t))) + dict['TARGETS'] = SCons.Util.PathList(map(os.path.normpath, map(rstr, t))) if dict['TARGETS']: dict['TARGET'] = dict['TARGETS'][0] @@ -289,7 +295,7 @@ class ActionBase: del kw['source'] if not SCons.Util.is_List(s): s = [s] - dict['SOURCES'] = SCons.Util.PathList(map(os.path.normpath, map(str, s))) + dict['SOURCES'] = SCons.Util.PathList(map(os.path.normpath, map(rstr, s))) if dict['SOURCES']: dict['SOURCE'] = dict['SOURCES'][0] @@ -357,7 +363,7 @@ class CommandAction(ActionBase): if execute_actions: try: ENV = kw['env']['ENV'] - except: + except KeyError: global default_ENV if not default_ENV: import SCons.Environment |