mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-22 07:43:06 +00:00
catch BackendError raised by Store(), see #8373
This commit is contained in:
parent
5be2485627
commit
c3038e129d
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
from borgstore.store import Store
|
from borgstore.store import Store
|
||||||
from borgstore.store import ObjectNotFound as StoreObjectNotFound
|
from borgstore.store import ObjectNotFound as StoreObjectNotFound
|
||||||
|
from borgstore.backends.errors import BackendError as StoreBackendError
|
||||||
from borgstore.backends.errors import BackendDoesNotExist as StoreBackendDoesNotExist
|
from borgstore.backends.errors import BackendDoesNotExist as StoreBackendDoesNotExist
|
||||||
|
|
||||||
from .checksums import xxh64
|
from .checksums import xxh64
|
||||||
|
@ -116,7 +117,10 @@ def __init__(
|
||||||
location = Location(url)
|
location = Location(url)
|
||||||
self._location = location
|
self._location = location
|
||||||
# use a Store with flat config storage and 2-levels-nested data storage
|
# use a Store with flat config storage and 2-levels-nested data storage
|
||||||
self.store = Store(url, levels={"config/": [0], "data/": [2]})
|
try:
|
||||||
|
self.store = Store(url, levels={"config/": [0], "data/": [2]})
|
||||||
|
except StoreBackendError as e:
|
||||||
|
raise Error(str(e))
|
||||||
self.version = None
|
self.version = None
|
||||||
# long-running repository methods which emit log or progress output are responsible for calling
|
# long-running repository methods which emit log or progress output are responsible for calling
|
||||||
# the ._send_log method periodically to get log and progress output transferred to the borg client
|
# the ._send_log method periodically to get log and progress output transferred to the borg client
|
||||||
|
|
Loading…
Reference in a new issue