1
0
Fork 0
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:
Thomas Waldmann 2015-08-20 18:40:24 +02:00
parent d3d78f7ae3
commit 0a2bd8dad5

View file

@ -176,7 +176,11 @@ class LockRoster:
json.dump(data, f)
def remove(self):
try:
os.unlink(self.path)
except OSError as e:
if e.errno != errno.ENOENT:
raise
def get(self, key):
roster = self.load()