Commit fa724e81 authored by Bartek Górny's avatar Bartek Górny

fixed bugs remaining after function naming changes; removed some redundant logs.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10728 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8fca71b8
...@@ -78,6 +78,7 @@ if context.getLanguage() is not None:\n ...@@ -78,6 +78,7 @@ if context.getLanguage() is not None:\n
ss.append(context.getReference()+\'-\'+context.getLanguage())\n ss.append(context.getReference()+\'-\'+context.getLanguage())\n
if context.getVersion() is not None:\n if context.getVersion() is not None:\n
ss.append(context.getReference()+\'-\'+context.getLanguage()+\'-\'+context.getVersion())\n ss.append(context.getReference()+\'-\'+context.getLanguage()+\'-\'+context.getVersion())\n
context.log(ss)\n
lst=[]\n lst=[]\n
for t in ss:\n for t in ss:\n
lst+=context.portal_catalog(SearchableText=\'%\'+t+\'%\')\n lst+=context.portal_catalog(SearchableText=\'%\'+t+\'%\')\n
......
...@@ -90,7 +90,7 @@ def getSimilarities(self,level=0):\n ...@@ -90,7 +90,7 @@ def getSimilarities(self,level=0):\n
\n \n
getSimilarities(context)\n getSimilarities(context)\n
if lista.has_key(context):lista.pop(context)\n if lista.has_key(context):lista.pop(context)\n
return [o.DMSDocument_getLastVersion() for o in lista.keys()]\n return [o.DMSDocument_getLatestVersion() for o in lista.keys()]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
#from Products.ERP5Type.Message import Message\n #from Products.ERP5Type.Message import Message\n
context.log(\'themail\',theMail)\n \n
noSenderInHeaderMsg="no sender in headers"\n noSenderInHeaderMsg="no sender in headers"\n
noSenderMsg="you are not in user database"\n noSenderMsg="you are not in user database"\n
manySendersMsg="very serious error: your address has multiple entries"\n manySendersMsg="very serious error: your address has multiple entries"\n
...@@ -157,13 +157,13 @@ return\n ...@@ -157,13 +157,13 @@ return\n
<string>theMail</string> <string>theMail</string>
<string>_print_</string> <string>_print_</string>
<string>_print</string> <string>_print</string>
<string>_getattr_</string>
<string>context</string>
<string>noSenderInHeaderMsg</string> <string>noSenderInHeaderMsg</string>
<string>noSenderMsg</string> <string>noSenderMsg</string>
<string>manySendersMsg</string> <string>manySendersMsg</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>fromraw</string> <string>fromraw</string>
<string>_getattr_</string>
<string>context</string>
<string>senderemail</string> <string>senderemail</string>
<string>None</string> <string>None</string>
<string>r</string> <string>r</string>
......
...@@ -77,14 +77,15 @@ if fname is None:\n ...@@ -77,14 +77,15 @@ if fname is None:\n
else:\n else:\n
context.setSourceReference(fname)\n context.setSourceReference(fname)\n
if fname is not None:\n if fname is not None:\n
context.log(fname)\n
context.setPropertyListFromFilename(fname)\n context.setPropertyListFromFilename(fname)\n
context.guessMimeType(fname)\n context.guessMimeType(fname)\n
if not context.getTitle():\n if not context.getTitle():\n
context.setTitle(fname)\n context.setTitle(fname)\n
# use duck typing to check if it is OOo\n # use duck typing to check if it is OOo\n
if hasattr(context,\'convert\') and hasattr(context,\'hasFile\') and hasattr(context,\'hasOOfile\'):\n if hasattr(context,\'convert\') and hasattr(context,\'hasFile\') and hasattr(context,\'hasOOFile\'):\n
context.reset()\n context.reset()\n
if context.hasFile() and not context.hasOOfile():\n if context.hasFile() and not context.hasOOFile():\n
context.activate( activity = \'SQLQueue\').OOoDocument_convertAfter()\n context.activate( activity = \'SQLQueue\').OOoDocument_convertAfter()\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -69,14 +69,14 @@ ...@@ -69,14 +69,14 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>ob=context\n <value> <string>ob=context\n
if ob.hasFile() and not ob.hasOOfile(): #doublecheck\n if ob.hasFile() and not ob.hasOOFile(): #doublecheck\n
try:\n try:\n
res=ob.convert()\n res=ob.convert()\n
ob.log(res)\n ob.log(res)\n
ob.setStatusMessage(str(res[1]))\n ob.setExternalProcessingStatusMessage(str(res[1]))\n
except Exception,e:\n except Exception,e:\n
ob.log(e)\n ob.log(e)\n
ob.setStatusMessage(str(e))\n ob.setExternalProcessingStatusMessage(str(e))\n
#raise Exception(str(e)) # do we want the activity to keep trying?\n #raise Exception(str(e)) # do we want the activity to keep trying?\n
</string> </value> </string> </value>
</item> </item>
......
264 273
\ No newline at end of file \ No newline at end of file
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