Skip to content

Commit

Permalink
修复文件不存在时的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
answer-huang committed Oct 10, 2014
1 parent 1de0588 commit d0748b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dSYM.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,14 @@ def getdSYMFileFromSqlite(self):
cu = cx.cursor()
##查询
cu.execute("select * from archives")
self.filesList = [dsym[0] for dsym in cu.fetchall()]
for dsym in cu.fetchall():
if not os.path.exists(dsym[0]):
execSql = "delete from archives where file_path ='%s'" % dsym[0]
cu.execute(execSql)
cx.commit()
else:
self.filesList.append(dsym[0])#[dsym[0] for dsym in cu.fetchall() if os.path.exists(dsym[0])]
print self.filesList
self.ShowFileType()

#获取最后需要的文件地址
Expand Down

0 comments on commit d0748b7

Please sign in to comment.