Merge lp:~liuyq0307/lava-dispatcher/fix-925396 into lp:lava-dispatcher

Proposed by Yongqin Liu
Status: Merged
Merged at revision: 217
Proposed branch: lp:~liuyq0307/lava-dispatcher/fix-925396
Merge into: lp:lava-dispatcher
Diff against target: 12 lines (+1/-1)
1 file modified
lava_dispatcher/job.py (+1/-1)
To merge this branch: bzr merge lp:~liuyq0307/lava-dispatcher/fix-925396
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+91235@code.launchpad.net

Description of the change

convert the err to string for unicode method

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

You may call unicode() on the error instance. This will allow the class to return an unicode string instead. Anyway, this is good so +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/job.py'
2--- lava_dispatcher/job.py 2012-01-27 04:17:56 +0000
3+++ lava_dispatcher/job.py 2012-02-02 11:10:55 +0000
4@@ -138,7 +138,7 @@
5 logging.info("Action %s finished." % cmd['command'])
6 if status == 'fail':
7 err_msg = "Lava failed at action %s with error: %s\n" %\
8- (cmd['command'], unicode(err, 'ascii', 'replace'))
9+ (cmd['command'], unicode(str(err), 'ascii', 'replace'))
10 if cmd['command'] == 'lava_test_run':
11 err_msg += "Lava failed on test: %s" %\
12 params.get('test_name', "Unknown")

Subscribers

People subscribed via source and target branches