forked from ungleich-public/cdist
silently ignore error when deleting nonexistent file
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
19ad2fe4a9
commit
d7adff4e21
1 changed files with 5 additions and 1 deletions
|
@ -134,7 +134,11 @@ class FileListProperty(FileList):
|
|||
|
||||
def __set__(self, obj, value):
|
||||
self._set_path(obj)
|
||||
os.unlink(self.path)
|
||||
try:
|
||||
os.unlink(self.path)
|
||||
except EnvironmentError:
|
||||
# ignored
|
||||
pass
|
||||
for item in value:
|
||||
self.append(item)
|
||||
|
||||
|
|
Loading…
Reference in a new issue