浏览代码

Merge pull request #351 from grissiom/fix-tools-srcremove

tools: fix SrcRemove on empty src
Bernard Xiong 10 年之前
父节点
当前提交
a4bb77d097
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tools/building.py

+ 3 - 0
tools/building.py

@@ -495,6 +495,9 @@ def EndBuilding(target, program = None):
         CscopeDatabase(Projects)
         CscopeDatabase(Projects)
 
 
 def SrcRemove(src, remove):
 def SrcRemove(src, remove):
+    if not src:
+        return
+
     if type(src[0]) == type('str'):
     if type(src[0]) == type('str'):
         for item in src:
         for item in src:
             if os.path.basename(item) in remove:
             if os.path.basename(item) in remove: