logilab-common #6675 default values for store_* are not honored [open]
configuration module stores by default the complementary value at the startup but the python documentation says that we can do that indifferently : http://docs.python.org/library/optparse.html#default-values In specification this is equivalent: parser.add_option("-v", action="store_true", dest="verbose") parser.add_option("-q", action="store_false", dest="verbose", default=True) and parser.add_option("-v", action="store_true", dest="verbose", default=True) parser.add_option("-q", action="store_false", dest="verbose") But with configuration.py: self.options = ( ('quiet', {'action': 'store_false', 'dest' : "verbose", }), ('verbose', {'action': 'store_true', 'dest' : "verbose", 'default': True, }), ) The default True value will not be honored because overwritten by the verbose option. | |
priority | minor |
---|---|
type | bug |
done in | <not specified> |
load | 0.500 |
load left | 0.500 |
closed by | <not specified> |