Skip to content

Commit

Permalink
fix: fixed bug in file accessibility check (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik authored Jul 22, 2024
1 parent 03ab345 commit ac86891
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aidial_adapter_dial/utils/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ async def is_accessible(
) -> bool:
try:
await self._get_metadata(url, session)
log.debug(f"file is accessible: url={url!r}")
return True
except AccessDeniedError:
log.debug(f"file isn't accessible: url={url!r}")
return False
finally:
log.debug(f"file is accessible: url={url!r}")
return True

def to_metadata_url(self, url: str) -> str:
"""
Expand Down

0 comments on commit ac86891

Please sign in to comment.