diff options
author | Sylvain <syt@logilab.fr> | 2006-09-19 12:41:30 +0200 |
---|---|---|
committer | Sylvain <syt@logilab.fr> | 2006-09-19 12:41:30 +0200 |
commit | d2f29935e7601247b1a73eec79f262a77805f20e (patch) | |
tree | 4ed2d2e64de3f5ae7ec8feac75e75fe1c69fc2ba /configuration.py | |
parent | d9eccc57048c373a6c37d51a77a827aa4499b75c (diff) | |
download | logilab-common-d2f29935e7601247b1a73eec79f262a77805f20e.tar.gz |
fix named option handling
Diffstat (limited to 'configuration.py')
-rw-r--r-- | configuration.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configuration.py b/configuration.py index 81934de..1337cd4 100644 --- a/configuration.py +++ b/configuration.py @@ -639,6 +639,12 @@ class OptionsProviderMixIn: value = convert(value, opt_dict, opt_name) if action is None: action = opt_dict.get('action', 'store') + if opt_dict.get('type') == 'named': # XXX need specific handling + optname = self.option_name(opt_name, opt_dict) + currentvalue = getattr(self.config, optname, None) + if currentvalue: + currentvalue.update(value) + value = currentvalue if action == 'store': setattr(self.config, self.option_name(opt_name, opt_dict), value) elif action in ('store_true', 'count'): |