Merge lp:~syleam/openobject-server/5.0-fix-import_data-message into lp:openobject-server/5.0

Proposed by Christophe CHAUVET
Status: Rejected
Rejected by: Jay Vora (Serpent Consulting Services)
Proposed branch: lp:~syleam/openobject-server/5.0-fix-import_data-message
Merge into: lp:openobject-server/5.0
Diff against target: 18 lines (+3/-4)
1 file modified
bin/osv/orm.py (+3/-4)
To merge this branch: bzr merge lp:~syleam/openobject-server/5.0-fix-import_data-message
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Disapprove
Review via email: mp+20240@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Not all the exceptions have e[1].

review: Disapprove

Unmerged revisions

1992. By Christophe CHAUVET

[FIX] Better error message when a exception cannot from to the database

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/orm.py'
2--- bin/osv/orm.py 2010-02-25 15:13:44 +0000
3+++ bin/osv/orm.py 2010-02-26 18:23:13 +0000
4@@ -871,11 +871,10 @@
5 msg = self.pool._sql_error[key]
6 break
7 return (-1, res, 'Line ' + str(counter) +' : ' + msg, '' )
8- if isinstance(e, osv.orm.except_orm ):
9+ else:
10 msg = _('Insertion Failed! ' + e[1])
11- return (-1, res, 'Line ' + str(counter) +' : ' + msg, '' )
12- #Raising Uncaught exception
13- raise
14+ return (-1, res, 'Line ' + str(counter) +' : ' + msg, '')
15+
16 for lang in translate:
17 context2 = context.copy()
18 context2['lang'] = lang