[Erp5-report] r35415 fabien - /erp5/trunk/products/ERP5/Document/IdGenerator.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 18 10:28:44 CEST 2010
Author: fabien
Date: Tue May 18 10:28:41 2010
New Revision: 35415
URL: http://svn.erp5.org?rev=35415&view=rev
Log:
Try/Except hide the traceback, in this case, it's better to have the traceback
to better identify the origin of the problem.
Thanks to Jérome and Danièle
Modified:
erp5/trunk/products/ERP5/Document/IdGenerator.py
Modified: erp5/trunk/products/ERP5/Document/IdGenerator.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/IdGenerator.py?rev=35415&r1=35414&r2=35415&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/IdGenerator.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/IdGenerator.py [utf8] Tue May 18 10:28:41 2010
@@ -72,10 +72,7 @@
Use int to store the last_id, use also a persistant mapping for to be
persistent.
"""
- try:
- specialise = self.getSpecialiseValue()
- except AttributeError:
- raise AttributeError, 'specialise is not defined'
+ specialise = self.getSpecialiseValue()
if specialise is None:
raise ValueError, "the id generator %s doesn't have specialise value" %\
self.getReference()
@@ -95,10 +92,7 @@
# For compatibilty with sql data, must not use id_group as a list
if not isinstance(id_group, str):
raise AttributeError, 'id_group is not a string'
- try:
- specialise = self.getSpecialiseValue()
- except AttributeError:
- raise AttributeError, 'specialise is not defined'
+ specialise = self.getSpecialiseValue()
if specialise is None:
raise ValueError, "the id generator %s doesn't have specialise value" %\
self.getReference()
More information about the Erp5-report
mailing list