Skip to content

Commit

Permalink
repository: also refresh the lock in other repo methods
Browse files Browse the repository at this point in the history
get/put_manifest and store_* methods.
  • Loading branch information
ThomasWaldmann committed Oct 2, 2024
1 parent f1100f3 commit d991071
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/borg/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,25 +476,31 @@ def migrate_lock(self, old_id, new_id):
self.lock.migrate_lock(old_id, new_id)

def get_manifest(self):
self._lock_refresh()
try:
return self.store.load("config/manifest")
except StoreObjectNotFound:
raise NoManifestError

def put_manifest(self, data):
self._lock_refresh()
return self.store.store("config/manifest", data)

def store_list(self, name):
self._lock_refresh()
try:
return list(self.store.list(name))
except StoreObjectNotFound:
return []

def store_load(self, name):
self._lock_refresh()
return self.store.load(name)

def store_store(self, name, value):
self._lock_refresh()
return self.store.store(name, value)

def store_delete(self, name):
self._lock_refresh()
return self.store.delete(name)

0 comments on commit d991071

Please sign in to comment.