Commit 468f02b6 authored by Bartek Górny's avatar Bartek Górny

status_message is now called external_processing_status_message

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10553 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8891bb30
...@@ -128,20 +128,20 @@ class ExternalDocument(DMSFile): ...@@ -128,20 +128,20 @@ class ExternalDocument(DMSFile):
s,inf=self._spiderSource() s,inf=self._spiderSource()
except Exception,e: except Exception,e:
self.log(e,level=1) self.log(e,level=1)
self.setStatusMessage("Tried on %s: %s" % (self._time(),str(e))) self.setExternalProcessingStatusMessage("Tried on %s: %s" % (self._time(),str(e)))
return False return False
chars=len(s) chars=len(s)
if chars==0: if chars==0:
self.setStatusMessage("Tried on %s: got empty string" % self._time()) self.setExternalProcessingStatusMessage("Tried on %s: got empty string" % self._time())
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)
self.setStatusMessage("Spidered on %s, %i chars, but could not process; reason: %s" % (self._time(), chars, str(e))) self.setExternalProcessingStatusMessage("Spidered on %s, %i chars, but could not process; reason: %s" % (self._time(), chars, str(e)))
return False return False
self.setTextContent(s) self.setTextContent(s)
self.setStatusMessage("Spidered on %s, %i chars, recorded %i chars" % (self._time(), chars, len(s))) self.setExternalProcessingStatusMessage("Spidered on %s, %i chars, recorded %i chars" % (self._time(), chars, len(s)))
return True return True
security.declareProtected(Permissions.View, 'getProtocolItemList') security.declareProtected(Permissions.View, 'getProtocolItemList')
......
...@@ -204,7 +204,7 @@ class ExternalWebPage(ExternalDocument): ...@@ -204,7 +204,7 @@ class ExternalWebPage(ExternalDocument):
try: try:
s=recode(s) s=recode(s)
except CanNotDecode: except CanNotDecode:
self.setStatusMessage("Spidered on %s, %i chars, but could not decode" % (self._time(), chars)) self.setExternalProcessingStatusMessage("Spidered on %s, %i chars, but could not decode" % (self._time(), chars))
return False return False
s=stripHtml(s) # remove headers, doctype and the like s=stripHtml(s) # remove headers, doctype and the like
s=clearHtml(s) # remove tags s=clearHtml(s) # remove tags
......
...@@ -3,7 +3,7 @@ class ExternalDocument: ...@@ -3,7 +3,7 @@ class ExternalDocument:
""" """
""" """
_properties = ( _properties = (
{ 'id' : 'status_message', { 'id' : 'external_processing_status_message',
'description' : 'message about status', 'description' : 'message about status',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
......
...@@ -35,7 +35,7 @@ class OOoDocument: ...@@ -35,7 +35,7 @@ class OOoDocument:
'description' : 'mime type of OOo version', 'description' : 'mime type of OOo version',
'type' : 'string', 'type' : 'string',
'mode' : ''}, 'mode' : ''},
{ 'id' : 'status_message', { 'id' : 'external_processing_status_message',
'description' : 'message about status', 'description' : 'message about status',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
......
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