Commit 6dc79da6 authored by Bartek Górny's avatar Bartek Górny

fixed calling workflow actions

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12612 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 13f36570
...@@ -132,23 +132,23 @@ class ExternalDocument(Document): ...@@ -132,23 +132,23 @@ class ExternalDocument(Document):
except Exception,e: except Exception,e:
self.log(e,level=1) self.log(e,level=1)
msg = "Tried on %s: %s" % (self._time(),str(e)) msg = "Tried on %s: %s" % (self._time(),str(e))
portal_workflow.doActionFor(context, 'process', comment=msg) portal_workflow.doActionFor(self, 'process', comment=msg)
return False return False
chars=len(s) chars=len(s)
if chars==0: if chars==0:
msg = "Tried on %s: got empty string" % self._time() msg = "Tried on %s: got empty string" % self._time()
portal_workflow.doActionFor(context, 'process', comment=msg) portal_workflow.doActionFor(self, 'process', comment=msg)
return False return False
try: try:
s=self._processData(s,inf) s=self._processData(s,inf)
except Exception,e: except Exception,e:
self.log(e,level=1) self.log(e,level=1)
msg = "Spidered on %s, %i chars, but could not process; reason: %s" % (self._time(), chars, str(e)) msg = "Spidered on %s, %i chars, but could not process; reason: %s" % (self._time(), chars, str(e))
portal_workflow.doActionFor(context, 'process', comment=msg) portal_workflow.doActionFor(self, 'process', comment=msg)
return False return False
self.setTextContent(s) self.setTextContent(s)
msg = "Spidered on %s, %i chars, recorded %i chars" % (self._time(), chars, len(s)) msg = "Spidered on %s, %i chars, recorded %i chars" % (self._time(), chars, len(s))
portal_workflow.doActionFor(context, 'process', comment=msg) portal_workflow.doActionFor(self, 'process', comment=msg)
return True return True
security.declareProtected(Permissions.View, 'getProtocolItemList') security.declareProtected(Permissions.View, 'getProtocolItemList')
......
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