~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-02-27 22:08:46 UTC
  • mfrom: (2227.4.1 bzr.78026)
  • Revision ID: pqm@pqm.ubuntu.com-20070227220846-8cce3b2986915092
CapitalizeĀ rocksĀ output

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
            our_server_key_hex = paramiko.util.hexify(our_server_key.get_fingerprint())
226
226
        else:
227
227
            warning('Adding %s host key for %s: %s' % (keytype, host, server_key_hex))
228
 
            if host not in BZR_HOSTKEYS:
229
 
                BZR_HOSTKEYS[host] = {}
230
 
            BZR_HOSTKEYS[host][keytype] = server_key
 
228
            add = getattr(BZR_HOSTKEYS, 'add', None)
 
229
            if add is not None: # paramiko >= 1.X.X
 
230
                BZR_HOSTKEYS.add(host, keytype, server_key)
 
231
            else:
 
232
                BZR_HOSTKEYS.setdefault(host, {})[keytype] = server_key
231
233
            our_server_key = server_key
232
234
            our_server_key_hex = paramiko.util.hexify(our_server_key.get_fingerprint())
233
235
            save_host_keys()