diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configuration.py | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,7 @@ ChangeLog for logilab.common -- * testlib: introduce InnerTest class to name generative tests * modutils: included Stefan Rank's patch to deal with 2.4 relative import + * configuration: don't give option's keywords not recognized by optparse 2008-02-05 -- 0.28.0 * date: new `add_days_worked` function diff --git a/configuration.py b/configuration.py index 271afcc..2dc0d18 100644 --- a/configuration.py +++ b/configuration.py @@ -389,6 +389,10 @@ class OptionsManagerMixIn(object): self._short_options[opt_dict['short']] = opt_name args.append('-' + opt_dict['short']) del opt_dict['short'] + available_keys = set(self._optik_parser.option_class.ATTRS) + for key in opt_dict.keys(): + if not key in available_keys: + opt_dict.pop(key) return args, opt_dict def cb_set_provider_option(self, option, opt_name, value, parser): |