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:
commit
b00ae897f1
1 changed files with 4 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue