Commit 6938bc05 authored by Arnaud Fontaine's avatar Arnaud Fontaine

pylint: Fix typos.

parent cb0684df
...@@ -125,17 +125,17 @@ def _buildAstroidModuleFromComponentModuleName(modname): ...@@ -125,17 +125,17 @@ def _buildAstroidModuleFromComponentModuleName(modname):
obj = getattr(component_tool, obj = getattr(component_tool,
component_id.replace('_version', '', 1)) component_id.replace('_version', '', 1))
except AttributeError: except AttributeError:
raise AstroidBuildingException raise AstroidBuildingException()
if obj.getValidationState() in ('modified', 'validated'): if obj.getValidationState() in ('modified', 'validated'):
component_obj = obj component_obj = obj
else: else:
raise AstroidBuildingException raise AstroidBuildingException()
else: else:
try: try:
package, reference = component_id.split('.', 1) package, reference = component_id.split('.', 1)
except ValueError: except ValueError:
raise AstroidBuildingException raise AstroidBuildingException()
for version in portal.getVersionPriorityNameList(): for version in portal.getVersionPriorityNameList():
try: try:
obj = getattr(component_tool, obj = getattr(component_tool,
...@@ -154,7 +154,7 @@ def _buildAstroidModuleFromComponentModuleName(modname): ...@@ -154,7 +154,7 @@ def _buildAstroidModuleFromComponentModuleName(modname):
return module return module
if component_obj is None: if component_obj is None:
raise AstroidBuildingException raise AstroidBuildingException()
# module_build() could also be used but this requires importing # module_build() could also be used but this requires importing
# the ZODB Component and also monkey-patch it to support PEP-302 # the ZODB Component and also monkey-patch it to support PEP-302
...@@ -166,7 +166,7 @@ def _buildAstroidModuleFromComponentModuleName(modname): ...@@ -166,7 +166,7 @@ def _buildAstroidModuleFromComponentModuleName(modname):
def fail_hook_erp5_component(modname): def fail_hook_erp5_component(modname):
if not modname.startswith('erp5.'): if not modname.startswith('erp5.'):
raise AstroidBuildingException raise AstroidBuildingException()
if (modname in ('erp5.portal_type', if (modname in ('erp5.portal_type',
'erp5.component', 'erp5.component',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment