summaryrefslogtreecommitdiff
path: root/configuration.py
diff options
context:
space:
mode:
authorSylvain <syt@logilab.fr>2006-09-19 12:41:30 +0200
committerSylvain <syt@logilab.fr>2006-09-19 12:41:30 +0200
commitd2f29935e7601247b1a73eec79f262a77805f20e (patch)
tree4ed2d2e64de3f5ae7ec8feac75e75fe1c69fc2ba /configuration.py
parentd9eccc57048c373a6c37d51a77a827aa4499b75c (diff)
downloadlogilab-common-d2f29935e7601247b1a73eec79f262a77805f20e.tar.gz
fix named option handling
Diffstat (limited to 'configuration.py')
-rw-r--r--configuration.py6
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'):