[IMP] use dict.update instead of __setitem__ sequences

bzr revid: xmo@openerp.com-20110801073050-xr37h37sc8w8xhi5
This commit is contained in:
Xavier Morel 2011-08-01 09:30:50 +02:00
parent 923e4da38c
commit 92a9836bbb
1 changed files with 6 additions and 4 deletions

View File

@ -109,13 +109,15 @@ class db(netsvc.ExportService):
cr.execute('SELECT login, password, name ' \
' FROM res_users ' \
' ORDER BY login')
serv.actions[id]['users'] = cr.dictfetchall()
serv.actions[id]['clean'] = True
serv.actions[id].update(
users=cr.dictfetchall(),
clean=True)
cr.commit()
cr.close()
except Exception, e:
serv.actions[id]['clean'] = False
serv.actions[id]['exception'] = e
serv.actions[id].update(
clean=False,
exception=e)
import traceback
e_str = StringIO()
traceback.print_exc(file=e_str)