Merge lp:~chris.macnaughton/mojo/string-logs into lp:~ost-maintainers/mojo/py3

Proposed by Chris MacNaughton on 2018-07-19
Status: Merged
Merged at revision: 472
Proposed branch: lp:~chris.macnaughton/mojo/string-logs
Merge into: lp:~ost-maintainers/mojo/py3
Diff against target: 22 lines (+5/-1)
1 file modified
mojo/juju/debuglogs.py (+5/-1)
To merge this branch: bzr merge lp:~chris.macnaughton/mojo/string-logs
Reviewer Review Type Date Requested Status
Liam Young 2018-07-19 Approve on 2018-07-19
Review via email: mp+349900@code.launchpad.net
To post a comment you must log in.
Liam Young (gnuoy) wrote :

LGTM, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mojo/juju/debuglogs.py'
2--- mojo/juju/debuglogs.py 2017-01-11 02:34:42 +0000
3+++ mojo/juju/debuglogs.py 2018-07-19 11:25:09 +0000
4@@ -1,5 +1,6 @@
5 import ast
6 import logging
7+import six
8 import subprocess
9 import yaml
10
11@@ -101,7 +102,10 @@
12
13 def _run_remote_command(self, unit, command, sanitized_path_list):
14 cmd = ['juju', 'run', '--unit', unit, "{} {}".format(command, " ".join(sanitized_path_list))]
15- return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
16+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
17+ if six.PY3:
18+ output = output.decode('utf-8')
19+ return
20
21 def _gather_logs(self):
22 output = []

Subscribers

People subscribed via source and target branches