diff options
| author | aozima <[email protected]> | 2017-10-23 20:12:28 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2017-10-24 09:49:48 +0800 |
| commit | a1902f2de0b8dda7530c43d4bd1f8674884b5a8d (patch) | |
| tree | 49e61c5e3bd2eb57fcd4572e839c5049c4089218 /tools/building.py | |
| parent | 601ab358412db7de72cb4bec91c1bfefed8a2115 (diff) | |
update SrcRemove(): auto detect string or file object.
Diffstat (limited to 'tools/building.py')
| -rw-r--r-- | tools/building.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/building.py b/tools/building.py index 204fd5037f..f5cbd31617 100644 --- a/tools/building.py +++ b/tools/building.py @@ -695,15 +695,13 @@ def SrcRemove(src, remove): if not src: return - if type(src[0]) == type('str'): - for item in src: + for item in src: + if type(item) == type('str'): if os.path.basename(item) in remove: src.remove(item) - return - - for item in src: - if os.path.basename(item.rstr()) in remove: - src.remove(item) + else: + if os.path.basename(item.rstr()) in remove: + src.remove(item) def GetVersion(): import SCons.cpp |
