summaryrefslogtreecommitdiff
path: root/configuration.py
diff options
context:
space:
mode:
authorStephanie Marcu <stephanie.marcu@logilab.fr>2009-09-04 09:08:23 +0200
committerStephanie Marcu <stephanie.marcu@logilab.fr>2009-09-04 09:08:23 +0200
commitfc1337f5000b3470acabc2ab6ffd0ac32d300bc2 (patch)
treefeadb838f287c8950b1442e569f1cb152edac932 /configuration.py
parentc24c4f2a0553563c974047a699245d42d1f712c1 (diff)
downloadlogilab-common-fc1337f5000b3470acabc2ab6ffd0ac32d300bc2.tar.gz
[configuration] in help, display the different choices of an option if "choices" in opt_dict
Diffstat (limited to 'configuration.py')
-rw-r--r--configuration.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/configuration.py b/configuration.py
index b56c841..969e36d 100644
--- a/configuration.py
+++ b/configuration.py
@@ -432,6 +432,8 @@ class OptionsManagerMixIn(object):
else:
opt_dict['action'] = 'callback'
opt_dict['callback'] = self.cb_set_provider_option
+ if 'choices' in opt_dict:
+ opt_dict['help'] += ': %s' % '|'.join(opt_dict['choices'])
# default is handled here and *must not* be given to optik if you
# want the whole machinery to work
if 'default' in opt_dict: