From 409d15cc665c629d24bf9d7609fac4124f09abd9 Mon Sep 17 00:00:00 2001 From: Matheus Felipe Date: Sun, 24 Dec 2023 22:43:58 -0300 Subject: [PATCH] Fix the float type conversion in the timeout_check resolve #1960 --- sherlock/sherlock.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index bf68689..2bb5419 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -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):