1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import os
- TRUE_VALUES = ('true', '1', 'yes')
- def get_boolean_option(option_dict, option_name, env_name):
- return ((option_name in option_dict and
- option_dict[option_name][1].lower() in TRUE_VALUES) or
- str(os.getenv(env_name)).lower() in TRUE_VALUES)
|