Commit 533e809b authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-12: mayoro

- addind AttributeError in exception type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23581 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2df879b5
......@@ -67,13 +67,9 @@
<key> <string>_body</string> </key>
<value> <string>def getTitle(url=\'\'):\n
try:\n
obj = context.getPortalObject().restrictedTraverse(url)\n
if hasattr(obj,\'getTitle\'):\n
return obj.getTitle()\n
else:\n
return url.split(\'/\')[-1]\n
except:\n
return url.split(\'/\')[-1]\n
return context.getPortalObject().restrictedTraverse(url).getTitle()\n
except AttributeError:\n
return url.split(\'/\')[-1]\n
\n
\n
from Products.ERP5Form.Report import ReportSection\n
......
69
\ No newline at end of file
74
\ 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