Fix the float type conversion in the timeout_check (#1963)

pull/903/merge
Matheus Felipe 4 months ago committed by GitHub
commit 2813b91bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -470,12 +470,14 @@ def timeout_check(value):
NOTE: Will raise an exception if the timeout in invalid.
"""
if value <= 0:
float_value = float(value)
if float_value <= 0:
raise ArgumentTypeError(
f"Invalid timeout value: {value}. Timeout must be a positive number."
)
return float(value)
return float_value
def handler(signal_received, frame):

Loading…
Cancel
Save