FileList handle exception when deleting old/unused file
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
589b5a68b9
commit
e70e0569ec
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ class FileList(collections.MutableSequence):
|
|||
self.path = path
|
||||
if initial:
|
||||
# delete existing file
|
||||
try:
|
||||
os.unlink(self.path)
|
||||
except EnvironmentError:
|
||||
# ignored
|
||||
pass
|
||||
for i in initial:
|
||||
self.append(i)
|
||||
|
||||
|
|
Loading…
Reference in a new issue