diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 210: Fix problem when reporting failure messages that contain unicode

Message ID 20120130175713.11573.50586.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson Jan. 30, 2012, 5:57 p.m. UTC
Merge authors:
  Michael Hudson-Doyle (mwhudson)
Related merge proposals:
  https://code.launchpad.net/~mwhudson/lava-dispatcher/unicode-error-in-error-reporting/+merge/90369
  proposed by: Michael Hudson-Doyle (mwhudson)
  review: Approve - Zygmunt Krynicki (zkrynicki)
------------------------------------------------------------
revno: 210 [merge]
committer: Paul Larson <paul.larson@linaro.org>
branch nick: lava-dispatcher
timestamp: Mon 2012-01-30 11:51:11 -0600
message:
  Fix problem when reporting failure messages that contain unicode
modified:
  doc/changes.rst
  lava_dispatcher/job.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'doc/changes.rst'
--- doc/changes.rst	2012-01-27 03:34:40 +0000
+++ doc/changes.rst	2012-01-30 17:51:11 +0000
@@ -1,6 +1,13 @@ 
 Version History
 ***************
 
+.. _version_0_5_0:
+
+Version 0.5.0
+================================
+* Add new android_install_binaries action
+* Fix problem when reporting failure messages that contain unicode
+
 .. _version_0_4_5:
 
 Version 0.4.5

=== modified file 'lava_dispatcher/job.py'
--- lava_dispatcher/job.py	2011-11-30 02:31:12 +0000
+++ lava_dispatcher/job.py	2012-01-27 04:17:56 +0000
@@ -138,7 +138,7 @@ 
                     logging.info("Action %s finished." % cmd['command'])
                     if status == 'fail':
                         err_msg = "Lava failed at action %s with error: %s\n" %\
-                                  (cmd['command'], err)
+                                  (cmd['command'], unicode(err, 'ascii', 'replace'))
                         if cmd['command'] == 'lava_test_run':
                             err_msg += "Lava failed on test: %s" %\
                                        params.get('test_name', "Unknown")