Merge lp:~fo0bar/turku/turku-agent-subprocess-encoding into lp:turku/turku-agent

Proposed by Ryan Finnie
Status: Merged
Approved by: Joel Sing
Approved revision: 55
Merged at revision: 55
Proposed branch: lp:~fo0bar/turku/turku-agent-subprocess-encoding
Merge into: lp:turku/turku-agent
Diff against target: 16 lines (+2/-2)
1 file modified
turku_agent/ping.py (+2/-2)
To merge this branch: bzr merge lp:~fo0bar/turku/turku-agent-subprocess-encoding
Reviewer Review Type Date Requested Status
Canonical IS Reviewers Pending
Review via email: mp+381217@code.launchpad.net

Commit message

Revert subprocess portion of revno 53

Description of the change

encoding was only introduced in Python 3.6

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Joel Sing (jsing) wrote :

LGTM, thanks.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 55

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'turku_agent/ping.py'
2--- turku_agent/ping.py 2020-03-24 21:11:24 +0000
3+++ turku_agent/ping.py 2020-03-26 06:08:51 +0000
4@@ -62,10 +62,10 @@
5 storage['ssh_ping_host'],
6 'turku-ping-remote',
7 ]
8- p = subprocess.Popen(ssh_command, stdin=subprocess.PIPE, encoding='UTF-8')
9+ p = subprocess.Popen(ssh_command, stdin=subprocess.PIPE)
10
11 # Write the ssh request
12- p.stdin.write(json.dumps(ssh_req) + '\n.\n')
13+ p.stdin.write((json.dumps(ssh_req) + '\n.\n').encode('UTF-8'))
14 p.stdin.flush()
15
16 # Wait for the server to close the SSH connection

Subscribers

People subscribed via source and target branches

to all changes: