FileList handle exception when deleting old/unused file

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-13 18:01:46 +02:00
parent 589b5a68b9
commit e70e0569ec

View file

@ -43,7 +43,11 @@ class FileList(collections.MutableSequence):
self.path = path self.path = path
if initial: if initial:
# delete existing file # delete existing file
os.unlink(self.path) try:
os.unlink(self.path)
except EnvironmentError:
# ignored
pass
for i in initial: for i in initial:
self.append(i) self.append(i)