From a1902f2de0b8dda7530c43d4bd1f8674884b5a8d Mon Sep 17 00:00:00 2001 From: aozima Date: Mon, 23 Oct 2017 20:12:28 +0800 Subject: [PATCH] update SrcRemove(): auto detect string or file object. --- tools/building.py | 12 +++++------- 1 file 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