Rev 6606: (vila) Resolve Bug #1480015: Test failure: hexify removed from paramiko in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Oct 5 13:45:00 UTC 2015
At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 6606 [merge]
revision-id: pqm at pqm.ubuntu.com-20151005134500-v244rho557tv0ukd
parent: pqm at pqm.ubuntu.com-20150930164321-ct2v2qnmvimqt8qf
parent: a.starr.b at gmail.com-20150731010441-3domwjjtnjijxlr2
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2015-10-05 13:45:00 +0000
message:
(vila) Resolve Bug #1480015: Test failure: hexify removed from paramiko
(Andrew Starr-Bochicchio) (Andrew Starr-Bochicchio)
modified:
bzrlib/transport/ssh.py ssh.py-20060824042150-0s9787kng6zv1nwq-1
=== modified file 'bzrlib/transport/ssh.py'
--- a/bzrlib/transport/ssh.py 2011-12-19 13:23:58 +0000
+++ b/bzrlib/transport/ssh.py 2015-07-31 01:04:41 +0000
@@ -26,6 +26,7 @@
import socket
import subprocess
import sys
+from binascii import hexlify
from bzrlib import (
config,
@@ -276,6 +277,9 @@
class ParamikoVendor(SSHVendor):
"""Vendor that uses paramiko."""
+ def _hexify(self, s):
+ return hexlify(s).upper()
+
def _connect(self, username, password, host, port):
global SYSTEM_HOSTKEYS, BZR_HOSTKEYS
@@ -289,16 +293,14 @@
self._raise_connection_error(host, port=port, orig_error=e)
server_key = t.get_remote_server_key()
- server_key_hex = paramiko.util.hexify(server_key.get_fingerprint())
+ server_key_hex = self._hexify(server_key.get_fingerprint())
keytype = server_key.get_name()
if host in SYSTEM_HOSTKEYS and keytype in SYSTEM_HOSTKEYS[host]:
our_server_key = SYSTEM_HOSTKEYS[host][keytype]
- our_server_key_hex = paramiko.util.hexify(
- our_server_key.get_fingerprint())
+ our_server_key_hex = self._hexify(our_server_key.get_fingerprint())
elif host in BZR_HOSTKEYS and keytype in BZR_HOSTKEYS[host]:
our_server_key = BZR_HOSTKEYS[host][keytype]
- our_server_key_hex = paramiko.util.hexify(
- our_server_key.get_fingerprint())
+ our_server_key_hex = self._hexify(our_server_key.get_fingerprint())
else:
trace.warning('Adding %s host key for %s: %s'
% (keytype, host, server_key_hex))
@@ -308,8 +310,7 @@
else:
BZR_HOSTKEYS.setdefault(host, {})[keytype] = server_key
our_server_key = server_key
- our_server_key_hex = paramiko.util.hexify(
- our_server_key.get_fingerprint())
+ our_server_key_hex = self._hexify(our_server_key.get_fingerprint())
save_host_keys()
if server_key != our_server_key:
filename1 = os.path.expanduser('~/.ssh/known_hosts')
@@ -505,7 +506,7 @@
agent = paramiko.Agent()
for key in agent.get_keys():
trace.mutter('Trying SSH agent key %s'
- % paramiko.util.hexify(key.get_fingerprint()))
+ % self._hexify(key.get_fingerprint()))
try:
paramiko_transport.auth_publickey(username, key)
return
More information about the bazaar-commits
mailing list