sunet-fleetlock: also handle ReadTimeout
Turns out this was not caught by ConnectionError.
This commit is contained in:
parent
01768129f0
commit
aa88795ee0
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue