diff --git a/mylib/config.py b/mylib/config.py index b592232..34e1b08 100644 --- a/mylib/config.py +++ b/mylib/config.py @@ -649,6 +649,12 @@ class Config: # pylint: disable=too-many-instance-attributes log.debug('get(%s, %s): %s (%s)', section, option, value, type(value)) return value + def get_option(self, option, default=None): + """ Get an argument parser option value """ + if self.options and hasattr(self.options, option): + return getattr(self.options, option) + return default + def set(self, section, option, value): """ Set option value """ assert self.config_parser, 'Unconfigured options parser'