fix error in python < 2.5
bzr revid: chs@tinyerp.com-1a4fd26c58cb81e4ac358438187245aeaac5a849
This commit is contained in:
parent
2c8f39c5d6
commit
f5d02752c7
|
@ -135,14 +135,15 @@ class osv_pool(netsvc.Service):
|
|||
def exec_workflow(self, db, uid, obj, method, *args):
|
||||
cr = pooler.get_db(db).cursor()
|
||||
try:
|
||||
res = self.exec_workflow_cr(cr, uid, obj, method, *args)
|
||||
cr.commit()
|
||||
except orm.except_orm, inst:
|
||||
cr.rollback()
|
||||
self.abortResponse(1, inst.name, 'warning', inst.value)
|
||||
except except_osv, inst:
|
||||
cr.rollback()
|
||||
self.abortResponse(1, inst.name, inst[0], inst.value)
|
||||
try:
|
||||
res = self.exec_workflow_cr(cr, uid, obj, method, *args)
|
||||
cr.commit()
|
||||
except orm.except_orm, inst:
|
||||
cr.rollback()
|
||||
self.abortResponse(1, inst.name, 'warning', inst.value)
|
||||
except except_osv, inst:
|
||||
cr.rollback()
|
||||
self.abortResponse(1, inst.name, inst[0], inst.value)
|
||||
finally:
|
||||
cr.close()
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue