Commit 103eb40f authored by Arnaud Fontaine's avatar Arnaud Fontaine

Cosmetic: remove trailing whitespaces.

parent 3c2e966d
...@@ -3780,7 +3780,7 @@ class DocumentTemplateItem(FilesystemToZodbTemplateItem): ...@@ -3780,7 +3780,7 @@ class DocumentTemplateItem(FilesystemToZodbTemplateItem):
"%s.py" % class_id) "%s.py" % class_id)
def _importFile(self, file_name, file_obj): def _importFile(self, file_name, file_obj):
if (file_name.endswith('.py') and if (file_name.endswith('.py') and
file_obj.name.rsplit(os.path.sep, 2)[-2] == 'portal_components'): file_obj.name.rsplit(os.path.sep, 2)[-2] == 'portal_components'):
return return
......
...@@ -34,7 +34,7 @@ from Products.ERP5Type.Base import Base ...@@ -34,7 +34,7 @@ from Products.ERP5Type.Base import Base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from zLOG import LOG, INFO from zLOG import LOG, INFO
class Component(Base): class Component(Base):
# CMF Type Definition # CMF Type Definition
...@@ -93,7 +93,7 @@ class Component(Base): ...@@ -93,7 +93,7 @@ class Component(Base):
""" """
Add the Component to its appropriate module registry Add the Component to its appropriate module registry
""" """
namespace_fullname = self._getDynamicModuleNamespace() namespace_fullname = self._getDynamicModuleNamespace()
namespace_module = __import__(namespace_fullname, {}, {}, namespace_module = __import__(namespace_fullname, {}, {},
fromlist=[namespace_fullname]) fromlist=[namespace_fullname])
...@@ -108,7 +108,7 @@ class Component(Base): ...@@ -108,7 +108,7 @@ class Component(Base):
""" """
Delete the Component from its appropriate module registry Delete the Component from its appropriate module registry
""" """
namespace_fullname = self._getDynamicModuleNamespace() namespace_fullname = self._getDynamicModuleNamespace()
namespace_module = __import__(namespace_fullname, {}, {}, namespace_module = __import__(namespace_fullname, {}, {},
fromlist=[namespace_fullname]) fromlist=[namespace_fullname])
...@@ -221,7 +221,7 @@ class Component(Base): ...@@ -221,7 +221,7 @@ class Component(Base):
Try to import all Components and returns error as a dict if any Try to import all Components and returns error as a dict if any
""" """
import os.path import os.path
path_pattern = "%s%s*.py" % (cls._getFilesystemPath(), os.path.sep) path_pattern = "%s%s*.py" % (cls._getFilesystemPath(), os.path.sep)
LOG("ERP5Type.Core.Component", INFO, "Importing from %s" % path_pattern) LOG("ERP5Type.Core.Component", INFO, "Importing from %s" % path_pattern)
......
...@@ -12,4 +12,3 @@ class TestDocument(Base): ...@@ -12,4 +12,3 @@ class TestDocument(Base):
""" """
""" """
return "zozo" return "zozo"
...@@ -43,7 +43,7 @@ from zLOG import LOG, INFO, WARNING ...@@ -43,7 +43,7 @@ from zLOG import LOG, INFO, WARNING
_last_sync = -1 _last_sync = -1
class ComponentTool(BaseTool): class ComponentTool(BaseTool):
""" """
This tool provides methods to load the the different types This tool provides methods to load the the different types
of components of the ERP5 framework: Document classes, interfaces, of components of the ERP5 framework: Document classes, interfaces,
mixin classes, fields, accessors, etc. mixin classes, fields, accessors, etc.
""" """
......
...@@ -1241,7 +1241,7 @@ class _TestZodbComponent(ERP5TypeTestCase): ...@@ -1241,7 +1241,7 @@ class _TestZodbComponent(ERP5TypeTestCase):
pass pass
def _getComponentFullModuleName(self, module_name): def _getComponentFullModuleName(self, module_name):
return "%s.%s" % (self._getComponentModuleName(), module_name) return "%s.%s" % (self._getComponentModuleName(), module_name)
def failIfModuleImportable(self, module_name): def failIfModuleImportable(self, module_name):
full_module_name = self._getComponentFullModuleName(module_name) full_module_name = self._getComponentFullModuleName(module_name)
...@@ -1256,7 +1256,7 @@ class _TestZodbComponent(ERP5TypeTestCase): ...@@ -1256,7 +1256,7 @@ class _TestZodbComponent(ERP5TypeTestCase):
full_module_name) full_module_name)
def assertModuleImportable(self, module_name): def assertModuleImportable(self, module_name):
full_module_name = self._getComponentFullModuleName(module_name) full_module_name = self._getComponentFullModuleName(module_name)
try: try:
__import__(full_module_name, fromlist=[self._getComponentModuleName()], __import__(full_module_name, fromlist=[self._getComponentModuleName()],
...@@ -1335,7 +1335,7 @@ class _TestZodbComponent(ERP5TypeTestCase): ...@@ -1335,7 +1335,7 @@ class _TestZodbComponent(ERP5TypeTestCase):
self.assertEquals(component.getValidationState(), 'validated') self.assertEquals(component.getValidationState(), 'validated')
self.assertEquals(component._getErrorMessage(), '') self.assertEquals(component._getErrorMessage(), '')
self.assertEquals(component.getTextContent(), valid_code) self.assertEquals(component.getTextContent(), valid_code)
self.assertEquals(component.getTextContent(validated_only=True), valid_code) self.assertEquals(component.getTextContent(validated_only=True), valid_code)
self.assertModuleImportable('TestComponentWithSyntaxError') self.assertModuleImportable('TestComponentWithSyntaxError')
from Products.ERP5Type.Core.ExtensionComponent import ExtensionComponent from Products.ERP5Type.Core.ExtensionComponent import ExtensionComponent
...@@ -1466,7 +1466,7 @@ class TestPortalType(Person): ...@@ -1466,7 +1466,7 @@ class TestPortalType(Person):
self.assertHasAttribute(person, 'test42') self.assertHasAttribute(person, 'test42')
self.assertEquals(person.test42(), 42) self.assertEquals(person.test42(), 42)
# The Portal Type class should not be in ghost state by now as we tried # The Portal Type class should not be in ghost state by now as we tried
# to access test42() defined in TestPortalType Document Component # to access test42() defined in TestPortalType Document Component
self.assertModuleImportable('TestPortalType') self.assertModuleImportable('TestPortalType')
......
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