Skip to content

Commit

Permalink
sunet-fleetlock: also handle ReadTimeout
Browse files Browse the repository at this point in the history
Turns out this was not caught by ConnectionError.
  • Loading branch information
eest committed Jul 3, 2024
1 parent 0176812 commit aa88795
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion global/overlay/usr/local/bin/sunet-fleetlock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def do_fleetlock_request(
timeout=args.request_timeout,
auth=("", config[args.lock_group]["password"]),
)
except requests.exceptions.ConnectionError as e:
except (
requests.exceptions.ConnectionError,
requests.exceptions.ReadTimeout,
) as e:
print(f"POST request failed: {e}")
time.sleep(retry_sleep_delay)
continue
Expand Down

0 comments on commit aa88795

Please sign in to comment.