Browse Source

Merge "Support boolean values in get_default"

changes/41/630041/8
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
77e1316419
  1. 4
      zuul/lib/config.py

4
zuul/lib/config.py

@ -17,7 +17,9 @@ def get_default(config, section, option, default=None, expand_user=False):
if config.has_option(section, option):
# Need to be ensured that we get suitable
# type from config file by default value
if isinstance(default, int):
if isinstance(default, bool):
value = config.getboolean(section, option)
elif isinstance(default, int):
value = config.getint(section, option)
else:
value = config.get(section, option)

Loading…
Cancel
Save