Fix quiet/verbose config problem

This commit is contained in:
Shinya Kawaguchi 2017-07-22 16:21:32 +09:00
parent 98b9946a78
commit 2ba353aa72

View file

@ -133,7 +133,10 @@ class MergedConfigParser(object):
#: Set of types that should use the
#: :meth:`~configparser.RawConfigParser.getint` method.
GETINT_TYPES = {'int', 'count'}
GETINT_TYPES = {'int'}
#: Set of actions that should use the
#: :meth:`~configparser.RawConfigParser.getint` method.
GETINT_ACTIONS = {'count'}
#: Set of actions that should use the
#: :meth:`~configparser.RawConfigParser.getbool` method.
GETBOOL_ACTIONS = {'store_true', 'store_false'}
@ -185,6 +188,8 @@ class MergedConfigParser(object):
method = config_parser.get
if option.type in self.GETINT_TYPES:
method = config_parser.getint
elif option.action in self.GETINT_ACTIONS:
method = config_parser.getint
elif option.action in self.GETBOOL_ACTIONS:
method = config_parser.getboolean