fix runUpdated() to not freak out if a file disappears on it
This commit is contained in:
parent
382ed4b067
commit
a5b9ea860d
|
@ -190,6 +190,7 @@ class Importer:
|
|||
self.addImportDirectory(self.dirlist[site][0], False, site, self.dirlist[site][1])
|
||||
|
||||
for file in self.filelist:
|
||||
if os.path.exists(file):
|
||||
stat_info = os.stat(file)
|
||||
try:
|
||||
lastupdate = self.updated[file]
|
||||
|
@ -207,7 +208,8 @@ class Importer:
|
|||
# TODO we also test if directory, why?
|
||||
#if os.path.isdir(file):
|
||||
#self.import_file_dict(file, self.filelist[file][0], self.filelist[file][1])
|
||||
|
||||
else:
|
||||
removeFromFileList[file] = True
|
||||
self.addToDirList = filter(lambda x: self.addImportDirectory(x, True, self.addToDirList[x][0], self.addToDirList[x][1]), self.addToDirList)
|
||||
|
||||
for file in self.removeFromFileList:
|
||||
|
|
Loading…
Reference in New Issue
Block a user