Merge lp:~savoirfairelinux-openerp/openupgrade-server/unicode-exception into lp:openupgrade-server

Status: Merged
Merged at revision: 4636
Proposed branch: lp:~savoirfairelinux-openerp/openupgrade-server/unicode-exception
Merge into: lp:openupgrade-server
Diff against target: 12 lines (+1/-1)
1 file modified
openerp/openupgrade/openupgrade.py (+1/-1)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openupgrade-server/unicode-exception
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve
Stefan Rijnhart (Opener) Approve
Review via email: mp+191995@code.launchpad.net

Description of the change

Fixing exception that is raised when logging other exceptions on french systems.

Error message for e.message = """\
duplicate key value violates unique constraint "name_uniq"
DÉTAIL : Key (name)=(document_page_environment_manual) already exists."""":

      File "openerp/openerp/openupgrade/openupgrade.py", line 464, in wrapped_function
        (module, filename, e))
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 60: ordinal not in range(128)

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

LGTM, thanks!

review: Approve
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Hi,

LGTM.

review: Approve
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/openupgrade/openupgrade.py'
2--- openerp/openupgrade/openupgrade.py 2013-10-15 14:53:26 +0000
3+++ openerp/openupgrade/openupgrade.py 2013-10-21 14:34:14 +0000
4@@ -461,7 +461,7 @@
5 except Exception, e:
6 logger.error(
7 "%s: error in migration script %s: %s" %
8- (module, filename, e))
9+ (module, filename, e.message.decode('utf8')))
10 logger.exception(e)
11 raise
12 return wrapped_function

Subscribers

People subscribed via source and target branches