1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-10 14:15:43 +00:00

simple error msg for non-existing repo, fixes #8475

do not show a traceback for this (expected) case.
This commit is contained in:
Thomas Waldmann 2024-10-16 17:13:53 +02:00
parent dfbd3b7d5f
commit a49de25fe3
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -234,7 +234,10 @@ class Repository:
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())