update SrcRemove(): auto detect string or file object.
This commit is contained in:
parent
601ab35841
commit
a1902f2de0
|
@ -695,13 +695,11 @@ 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:
|
||||||
|
|
||||||
for item in src:
|
|
||||||
if os.path.basename(item.rstr()) in remove:
|
if os.path.basename(item.rstr()) in remove:
|
||||||
src.remove(item)
|
src.remove(item)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue