mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-03 05:35:58 +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()
|
self.lock = Lock(self.store, exclusive, timeout=lock_wait).acquire()
|
||||||
else:
|
else:
|
||||||
self.lock = None
|
self.lock = None
|
||||||
|
try:
|
||||||
readme = self.store.load("config/readme").decode()
|
readme = self.store.load("config/readme").decode()
|
||||||
|
except StoreObjectNotFound:
|
||||||
|
raise self.DoesNotExist(str(self._location)) from None
|
||||||
if readme != REPOSITORY_README:
|
if readme != REPOSITORY_README:
|
||||||
raise self.InvalidRepository(str(self._location))
|
raise self.InvalidRepository(str(self._location))
|
||||||
self.version = int(self.store.load("config/version").decode())
|
self.version = int(self.store.load("config/version").decode())
|
||||||
|
|
Loading…
Reference in a new issue