Skip to content

Commit

Permalink
Have decorator pass secondary exceptions transparently
Browse files Browse the repository at this point in the history
Signed-off-by: Ulincsys <ulincsys@gmail.com>
  • Loading branch information
Ulincsys committed Feb 17, 2025
1 parent 1d9583d commit 53c3c14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions augur/application/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ def new_func(ctx, *args, **kwargs):
try:
_ = client.request(
method="GET", url="http://chaoss.community", timeout=10, follow_redirects=True)

return ctx.invoke(function_internet_connection, *args, **kwargs)
except (TimeoutError, httpx.TimeoutException):
print("Request timed out.")
except httpx.NetworkError as e:
Expand All @@ -36,7 +34,9 @@ def new_func(ctx, *args, **kwargs):
There was an error while testing for network connectivity.\n \
Please check your connection to the internet to run Augur\n \
Consider setting http_proxy variables for limited access installations.")
sys.exit(-1)
sys.exit(-1)

return ctx.invoke(function_internet_connection, *args, **kwargs)

return update_wrapper(new_func, function_internet_connection)

Expand Down

0 comments on commit 53c3c14

Please sign in to comment.