update SrcRemove(): auto detect string or file object.

This commit is contained in:
aozima 2017-10-23 20:12:28 +08:00
parent 601ab35841
commit a1902f2de0
1 changed files with 5 additions and 7 deletions

View File

@ -695,15 +695,13 @@ def SrcRemove(src, remove):
if not src: if not src:
return 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: if os.path.basename(item) in remove:
src.remove(item) src.remove(item)
return else:
if os.path.basename(item.rstr()) in remove:
for item in src: src.remove(item)
if os.path.basename(item.rstr()) in remove:
src.remove(item)
def GetVersion(): def GetVersion():
import SCons.cpp import SCons.cpp