Make strtobool even more robust
If strtobool fails, return False always.
This commit is contained in:
@ -50,7 +50,10 @@ def strtobool(stringv):
|
||||
return False
|
||||
if isinstance(stringv, bool):
|
||||
return bool(stringv)
|
||||
return bool(dustrtobool(stringv))
|
||||
try:
|
||||
return bool(dustrtobool(stringv))
|
||||
except:
|
||||
return False
|
||||
|
||||
# Parse the configuration file
|
||||
try:
|
||||
|
Reference in New Issue
Block a user