[py3k] Fix config-level comparison in "cubicweb-ctl create" command
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 02 Jun 2016 10:27:34 +0200
changeset 11284 d4293b14c664
parent 11283 46dda5238bc2
child 11285 581b5b64b382
[py3k] Fix config-level comparison in "cubicweb-ctl create" command dict.get -> None, and None cannot compare to an int in Python 3.
cubicweb/cwctl.py
--- a/cubicweb/cwctl.py	Mon Jun 06 09:19:38 2016 +0200
+++ b/cubicweb/cwctl.py	Thu Jun 02 10:27:34 2016 +0200
@@ -382,7 +382,7 @@
         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)
+                           and odict.get('level', 0) <= self.config.config_level)
             for section in sections:
                 if section not in ('main', 'email', 'web'):
                     print('\n' + underline_title('%s options' % section))