[c-c create] we should also skip option with no type, else we may generate title for section without any option to fill stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 28 Mar 2011 19:02:47 +0200
branchstable
changeset 7131 5893b899c21f
parent 7130 5eb622c0c672
child 7132 e9c92bb79787
[c-c create] we should also skip option with no type, else we may generate title for section without any option to fill
cwctl.py
--- a/cwctl.py	Mon Mar 28 18:57:34 2011 +0200
+++ b/cwctl.py	Mon Mar 28 19:02:47 2011 +0200
@@ -366,8 +366,10 @@
         print
         helper.bootstrap(cubes, self.config.config_level)
         # input for cubes specific options
-        for section in set(sect.lower() for sect, opt, optdict in config.all_options()
-                           if optdict.get('level') <= self.config.config_level):
+        sections = set(sect.lower() for sect, opt, odict in config.all_options()
+                       if 'type' in odict
+                       and odict.get('level') <= self.config.config_level)
+        for section in sections:
             if section not in ('main', 'email', 'pyro'):
                 print '\n' + underline_title('%s options' % section)
                 config.input_config(section, self.config.config_level)