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:
- self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(selectedModule))
+ self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(module))
supported = True
self._control_group.clear()
configuration = self.projectInfo("MODULES")[module]["configuration"]
try:
param_supported = bertos_utils.isSupported(self.project(), property_id=(configuration, property))
except SupportedException, e:
- self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(selectedModule))
+ self.exceptionOccurred(self.tr("Error evaluating \"%1\" for parameter %2").arg(e.support_string).arg(property))
param_supported = True
if not param_supported:
# Doesn't show the unsupported parameters
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:
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():
try:
supported = bertos_utils.isSupported(self.project(), module=module)
except SupportedException, e:
- self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(selectedModule))
+ self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(module))
supported = True
if not supported:
module_item.setForeground(0, QBrush(QColor(Qt.red)))
"""
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