whoogle-search/app/models
Ben Busby d2fac809ca
Fix mishandling of empty config environment variables
The recent change to cast bool config vars as ints to handle a '0' or
'1' value was shortsighted, since it doesn't allow for instances where
the variable is set to an empty value (or '' or any invalid/non-int
value).

This introduces a read_config_bool method for reading values that should
be a '0' or '1', but will default to False if not a digit (otherwise the
value will be cast as bool(int(value)) if "value" is a digit str).

Fixes #288
2021-04-14 10:42:41 -04:00
..
__init__.py Feature: language config (#27) 2020-05-12 17:15:53 -06:00
config.py Fix mishandling of empty config environment variables 2021-04-14 10:42:41 -04:00