Commit 1375ee8b authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Remove useless useless safeguard 'exec' called before (re-)validating.

Pylint should be enough and has no side effects...
parent 020473fa
...@@ -271,19 +271,10 @@ class ComponentMixin(PropertyRecordableMixin, Base): ...@@ -271,19 +271,10 @@ class ComponentMixin(PropertyRecordableMixin, Base):
reference, version and text_content reference, version and text_content
""" """
if not self.checkConsistency(): if not self.checkConsistency():
text_content = self.getTextContent() for property_name in self._recorded_property_name_tuple:
# Even if pylint should report all errors, make sure that there is no self.clearRecordedProperty(property_name)
# error when executing the source code pylint before validating
try: self.validate()
exec text_content in {}
except BaseException, e:
self.setErrorMessageList(self.getTextContentErrorMessageList() +
[str(e)])
else:
for property_name in self._recorded_property_name_tuple:
self.clearRecordedProperty(property_name)
self.validate()
security.declareProtected(Permissions.ModifyPortalContent, 'checkSourceCode') security.declareProtected(Permissions.ModifyPortalContent, 'checkSourceCode')
def checkSourceCode(self): def checkSourceCode(self):
......
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