[Erp5-report] r31134 yusei - /erp5/trunk/products/ERP5/Document/Delivery.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 8 06:57:12 CET 2009
Author: yusei
Date: Tue Dec 8 06:57:11 2009
New Revision: 31134
URL: http://svn.erp5.org?rev=31134&view=rev
Log:
NotFound exception can be used for http 404 error. Use ValueError instead.
Modified:
erp5/trunk/products/ERP5/Document/Delivery.py
Modified: erp5/trunk/products/ERP5/Document/Delivery.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Delivery.py?rev=31134&r1=31133&r2=31134&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Delivery.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Delivery.py [utf8] Tue Dec 8 06:57:11 2009
@@ -40,7 +40,6 @@
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from zLOG import LOG, PROBLEM
-from zExceptions import NotFound
class Delivery(XMLObject, ImmobilisationDelivery):
"""
@@ -695,7 +694,7 @@
if len(res) > 0:
rule_id = res[0].getId()
else:
- raise NotFound('No such rule as %r is found' % (rule_reference,))
+ raise ValueError, 'No such rule as %r is found' % rule_reference
self._createAppliedRule(rule_id, force=force, **kw)
More information about the Erp5-report
mailing list