Fix raise-within-try in config validation helper (#123353)
This commit is contained in:
parent
c2f2a868c4
commit
ddc94030a6
1 changed files with 1 additions and 1 deletions
|
@ -770,9 +770,9 @@ def socket_timeout(value: Any | None) -> object:
|
|||
float_value = float(value)
|
||||
if float_value > 0.0:
|
||||
return float_value
|
||||
raise vol.Invalid("Invalid socket timeout value. float > 0.0 required.")
|
||||
except Exception as err:
|
||||
raise vol.Invalid(f"Invalid socket timeout: {err}") from err
|
||||
raise vol.Invalid("Invalid socket timeout value. float > 0.0 required.")
|
||||
|
||||
|
||||
def url(
|
||||
|
|
Loading…
Add table
Reference in a new issue