mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-13 07:33:47 +00:00
lock roster: catch file not found in remove() method and ignore it
This commit is contained in:
parent
d3d78f7ae3
commit
0a2bd8dad5
1 changed files with 5 additions and 1 deletions
|
@ -176,7 +176,11 @@ class LockRoster:
|
||||||
json.dump(data, f)
|
json.dump(data, f)
|
||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
os.unlink(self.path)
|
try:
|
||||||
|
os.unlink(self.path)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno != errno.ENOENT:
|
||||||
|
raise
|
||||||
|
|
||||||
def get(self, key):
|
def get(self, key):
|
||||||
roster = self.load()
|
roster = self.load()
|
||||||
|
|
Loading…
Add table
Reference in a new issue