mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-13 09:48:10 +03:00
Validate external core shutdown timeouts
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -232,9 +232,14 @@ class ConfigExternalCore(CoreConfiguration):
|
||||
'Shutdown timeout must be a number of seconds'
|
||||
)
|
||||
|
||||
value = float(value)
|
||||
try:
|
||||
value = float(value)
|
||||
except OverflowError as ex:
|
||||
raise ExternalCoreConfigurationError(
|
||||
'Shutdown timeout must be between 0.1 and 60 seconds'
|
||||
) from ex
|
||||
|
||||
if value < 0.1 or value > 60:
|
||||
if not 0.1 <= value <= 60:
|
||||
raise ExternalCoreConfigurationError(
|
||||
'Shutdown timeout must be between 0.1 and 60 seconds'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user