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
1 changed files with 5 additions and 1 deletions

View File

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