X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBModulePage.py;h=00d9d4bdcb2d46a3f9d0785b1dec2b39409c266a;hb=74787ad8b91866fea9188acfc63b4aa47140ac32;hp=afbe9891cbb1deb91c975dfb87d3a4726d61cb3e;hpb=9006725d9f57b31d4f4a75d4bab7ec07260f1202;p=bertos.git diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index afbe9891..00d9d4bd 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -77,7 +77,7 @@ class BModulePage(BWizardPage): the source tree. """ module = self.currentModule() - if module is not None: + if module: try: supported = bertos_utils.isSupported(self.project(), module=module) except SupportedException, e: @@ -182,9 +182,9 @@ class BModulePage(BWizardPage): Loads the module data. """ # Load the module data only if it isn't already loaded - if self.projectInfo("MODULES") == None \ - and self.projectInfo("LISTS") == None \ - and self.projectInfo("CONFIGURATIONS") == None: + if not self.projectInfo("MODULES") \ + and not self.projectInfo("LISTS") \ + and not self.projectInfo("CONFIGURATIONS"): try: bertos_utils.loadModuleData(self.project()) except ModuleDefineException, e: @@ -199,7 +199,7 @@ class BModulePage(BWizardPage): Fills the module tree with the module entries separated in categories. """ modules = self.projectInfo("MODULES") - if modules is None: + if not modules: return categories = {} for module, information in modules.items(): @@ -300,7 +300,7 @@ class BModulePage(BWizardPage): """ current_module = self.pageContent.moduleTree.currentItem() # return only the child items - if current_module is not None and current_module.parent() is not None: + if current_module and current_module.parent(): return unicode(current_module.text(0)) else: return None