[Erp5-dev] Modifying ZODB from zopectl debug - is it possible?

Jean-Paul Smets jp at nexedi.com
Sat Sep 29 11:05:23 CEST 2007


Pelletier Vincent a écrit :
> Le Vendredi 28 Septembre 2007 17:01, Jérome Perrin a écrit :
>   
>> Yes it should, but if you get a conflict error, you have to restart the
>> transaction correctly.
>>     
>
> BTW, when I have to track down a problem where an exception gets raized, I use 
> the following code:
>
> try:
>   [code to check]
> except:
>   import pdb; pdb.set_trace()
>   raise
>
> Thanks to the last raise, everything stays fine even if I mistakenly let code 
> execution continue...
> Probably a good habit to take ;) .
>
>   
I would recommend you to add
    except ConflictError:

(at least to remind everyone how important it is not to catch conflict
errors).

JPS.

-- 
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org






More information about the Erp5-dev mailing list