1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-22 07:43:06 +00:00

Merge pull request #8477 from ThomasWaldmann/non-existing-repo-errors

simple error msg for non-existing repo, fixes #8475
This commit is contained in:
TW 2024-10-16 18:41:18 +02:00 committed by GitHub
commit b00ae897f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,7 +234,10 @@ def open(self, *, exclusive, lock_wait=None, lock=True):
self.lock = Lock(self.store, exclusive, timeout=lock_wait).acquire()
else:
self.lock = None
readme = self.store.load("config/readme").decode()
try:
readme = self.store.load("config/readme").decode()
except StoreObjectNotFound:
raise self.DoesNotExist(str(self._location)) from None
if readme != REPOSITORY_README:
raise self.InvalidRepository(str(self._location))
self.version = int(self.store.load("config/version").decode())