Skip to content

Commit

Permalink
Catch backend errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Nov 16, 2023
1 parent 32c5c62 commit b088cf8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions audb/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ def _lookup(
"""
for repository in config.REPOSITORIES:

backend = access_backend(repository)
try:
backend = access_backend(repository)
except audbackend.BackendError:
continue

header = backend.join('/', name, 'db.yaml')

if backend.exists(header, version):
if backend.exists(header, version, suppress_backend_errors=True):
return repository, backend

raise RuntimeError(
Expand Down

0 comments on commit b088cf8

Please sign in to comment.