mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Fix raise-within-try in config validation helper (#123353)
This commit is contained in:
parent
c2f2a868c4
commit
ddc94030a6
@ -770,9 +770,9 @@ def socket_timeout(value: Any | None) -> object:
|
|||||||
float_value = float(value)
|
float_value = float(value)
|
||||||
if float_value > 0.0:
|
if float_value > 0.0:
|
||||||
return float_value
|
return float_value
|
||||||
raise vol.Invalid("Invalid socket timeout value. float > 0.0 required.")
|
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
raise vol.Invalid(f"Invalid socket timeout: {err}") from err
|
raise vol.Invalid(f"Invalid socket timeout: {err}") from err
|
||||||
|
raise vol.Invalid("Invalid socket timeout value. float > 0.0 required.")
|
||||||
|
|
||||||
|
|
||||||
def url(
|
def url(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user