Fix the float type conversion in the timeout_check

resolve #1960
pull/1963/head
Matheus Felipe 5 months ago
parent 4525fb48ad
commit 409d15cc66
No known key found for this signature in database
GPG Key ID: DEA9F17404F4AA7A

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

Loading…
Cancel
Save