Skip to content

Commit 93cad10

Browse files
committed
edit: fail if host not found
1 parent 3712fb2 commit 93cad10

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

boostedblob/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ async def edit(path: str, read_only: bool = False) -> None:
353353
async with bbb.BoostExecutor(DEFAULT_CONCURRENCY) as executor:
354354
try:
355355
await bbb.copyfile(path_obj, local, executor)
356+
except bbb.request.HostNotFoundError:
357+
raise
356358
except FileNotFoundError:
357359
print("File not found, creating new file...")
358360
with open(local, "w"):

boostedblob/request.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
from .xml import dict_to_xml, etree
3030

3131

32+
class HostNotFoundError(FileNotFoundError): ...
33+
34+
3235
@dataclass(frozen=True)
3336
class RawRequest:
3437
method: str

0 commit comments

Comments
 (0)