Merge lp:~andrewsomething/bzr/bts794146 into lp:bzr

Proposed by Andrew Starr-Bochicchio on 2015-07-31
Status: Merged
Approved by: Richard Wilbur on 2015-07-31
Approved revision: 6604
Merged at revision: 6606
Proposed branch: lp:~andrewsomething/bzr/bts794146
Merge into: lp:bzr
Diff against target: 60 lines (+9/-8)
1 file modified
bzrlib/transport/ssh.py (+9/-8)
To merge this branch: bzr merge lp:~andrewsomething/bzr/bts794146
Reviewer Review Type Date Requested Status
Richard Wilbur 2015-07-31 Approve on 2015-07-31
Review via email: mp+266499@code.launchpad.net

Commit message

Resolve Bug #1480015: Test failure: hexify removed from paramiko (Andrew Starr-Bochicchio)

Description of the change

To post a comment you must log in.
Richard Wilbur (richard-wilbur) wrote :

Thanks for noticing the problem, filing the bug, and providing a fix. I approve this merge request, but note that I have been trying to get the bzr Patch Queue Manager back up and running.
+1

(I posted Question #268568 [0] and then redirected to rt.ubuntu.com #26672. On 12 July 2015 I wrote the message I copy below.)

On Thu, Jul 2, 2015 at 10:50 AM, Jacek Nykis via RT <email address hidden> wrote:
> Hi Richard,
>
> We found another problem with bazaar PQM and are working on it.
>
> We will come back to you when it's resolved.
>
> Sorry for the delay.
>
> Regards,
> Jacek Nykis

Greetings Jacek, et al,

It's been 10 days and I haven't heard anything. Is there anything I
can do to help? My backlog of unmerged branches has grown from the
initial 2 to 4. This is important to the Bazaar (bzr) project as it
is part of the critical path for landing new branches.

Sincerely,
Richard

review: Approve
Richard Wilbur (richard-wilbur) wrote :

sent to pqm by email

Iain Lane (laney) wrote :

It looks like the pqm is working again - any idea how to get this branch merged?

Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/transport/ssh.py'
--- bzrlib/transport/ssh.py 2011-12-19 13:23:58 +0000
+++ bzrlib/transport/ssh.py 2015-07-31 02:18:32 +0000
@@ -26,6 +26,7 @@
26import socket26import socket
27import subprocess27import subprocess
28import sys28import sys
29from binascii import hexlify
2930
30from bzrlib import (31from bzrlib import (
31 config,32 config,
@@ -276,6 +277,9 @@
276class ParamikoVendor(SSHVendor):277class ParamikoVendor(SSHVendor):
277 """Vendor that uses paramiko."""278 """Vendor that uses paramiko."""
278279
280 def _hexify(self, s):
281 return hexlify(s).upper()
282
279 def _connect(self, username, password, host, port):283 def _connect(self, username, password, host, port):
280 global SYSTEM_HOSTKEYS, BZR_HOSTKEYS284 global SYSTEM_HOSTKEYS, BZR_HOSTKEYS
281285
@@ -289,16 +293,14 @@
289 self._raise_connection_error(host, port=port, orig_error=e)293 self._raise_connection_error(host, port=port, orig_error=e)
290294
291 server_key = t.get_remote_server_key()295 server_key = t.get_remote_server_key()
292 server_key_hex = paramiko.util.hexify(server_key.get_fingerprint())296 server_key_hex = self._hexify(server_key.get_fingerprint())
293 keytype = server_key.get_name()297 keytype = server_key.get_name()
294 if host in SYSTEM_HOSTKEYS and keytype in SYSTEM_HOSTKEYS[host]:298 if host in SYSTEM_HOSTKEYS and keytype in SYSTEM_HOSTKEYS[host]:
295 our_server_key = SYSTEM_HOSTKEYS[host][keytype]299 our_server_key = SYSTEM_HOSTKEYS[host][keytype]
296 our_server_key_hex = paramiko.util.hexify(300 our_server_key_hex = self._hexify(our_server_key.get_fingerprint())
297 our_server_key.get_fingerprint())
298 elif host in BZR_HOSTKEYS and keytype in BZR_HOSTKEYS[host]:301 elif host in BZR_HOSTKEYS and keytype in BZR_HOSTKEYS[host]:
299 our_server_key = BZR_HOSTKEYS[host][keytype]302 our_server_key = BZR_HOSTKEYS[host][keytype]
300 our_server_key_hex = paramiko.util.hexify(303 our_server_key_hex = self._hexify(our_server_key.get_fingerprint())
301 our_server_key.get_fingerprint())
302 else:304 else:
303 trace.warning('Adding %s host key for %s: %s'305 trace.warning('Adding %s host key for %s: %s'
304 % (keytype, host, server_key_hex))306 % (keytype, host, server_key_hex))
@@ -308,8 +310,7 @@
308 else:310 else:
309 BZR_HOSTKEYS.setdefault(host, {})[keytype] = server_key311 BZR_HOSTKEYS.setdefault(host, {})[keytype] = server_key
310 our_server_key = server_key312 our_server_key = server_key
311 our_server_key_hex = paramiko.util.hexify(313 our_server_key_hex = self._hexify(our_server_key.get_fingerprint())
312 our_server_key.get_fingerprint())
313 save_host_keys()314 save_host_keys()
314 if server_key != our_server_key:315 if server_key != our_server_key:
315 filename1 = os.path.expanduser('~/.ssh/known_hosts')316 filename1 = os.path.expanduser('~/.ssh/known_hosts')
@@ -505,7 +506,7 @@
505 agent = paramiko.Agent()506 agent = paramiko.Agent()
506 for key in agent.get_keys():507 for key in agent.get_keys():
507 trace.mutter('Trying SSH agent key %s'508 trace.mutter('Trying SSH agent key %s'
508 % paramiko.util.hexify(key.get_fingerprint()))509 % self._hexify(key.get_fingerprint()))
509 try:510 try:
510 paramiko_transport.auth_publickey(username, key)511 paramiko_transport.auth_publickey(username, key)
511 return512 return