mirror of
https://github.com/sherlock-project/sherlock
synced 2025-02-16 20:48:27 +00:00
Fix the float type conversion in the timeout_check (#1963)
This commit is contained in:
commit
2813b91bcb
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue