[cwctl] don't prompt for cube options in automatic mode stable
authorJulien Cristau <julien.cristau@logilab.fr>
Fri, 13 Jun 2014 11:00:41 +0200
branchstable
changeset 9923 da09975300aa
parent 9922 fc02ba8654a7
child 9924 25fc84990ddc
[cwctl] don't prompt for cube options in automatic mode Closes #3984223
cwctl.py
--- a/cwctl.py	Fri Jun 13 11:21:45 2014 +0200
+++ b/cwctl.py	Fri Jun 13 11:00:41 2014 +0200
@@ -396,13 +396,14 @@
         print
         helper.bootstrap(cubes, self.config.automatic, self.config.config_level)
         # input for cubes specific options
-        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', 'web'):
-                print '\n' + underline_title('%s options' % section)
-                config.input_config(section, self.config.config_level)
+        if not self.config.automatic:
+            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', 'web'):
+                    print '\n' + underline_title('%s options' % section)
+                    config.input_config(section, self.config.config_level)
         # write down configuration
         config.save()
         self._handle_win32(config, appid)