diff --git a/twisted/conch/scripts/tkconch.py b/twisted/conch/scripts/tkconch.py
index eb00186..c97697b 100644
|
a
|
b
|
|
| 371 | 371 | elif goodKey == 2: # AAHHHHH changed |
| 372 | 372 | return defer.fail(error.ConchError('bad host key')) |
| 373 | 373 | else: |
| 374 | | if options['host'] == self.transport.getPeer()[1]: |
| | 374 | if options['host'] == self.transport.getPeer().host: |
| 375 | 375 | host = options['host'] |
| 376 | 376 | khHost = options['host'] |
| 377 | 377 | else: |
| 378 | 378 | host = '%s (%s)' % (options['host'], |
| 379 | | self.transport.getPeer()[1]) |
| | 379 | self.transport.getPeer().host) |
| 380 | 380 | khHost = '%s,%s' % (options['host'], |
| 381 | | self.transport.getPeer()[1]) |
| | 381 | self.transport.getPeer().host) |
| 382 | 382 | keyType = common.getNS(pubKey)[0] |
| 383 | 383 | ques = """The authenticity of host '%s' can't be established.\r |
| 384 | 384 | %s key fingerprint is %s.""" % (host, |
diff --git a/twisted/protocols/htb.py b/twisted/protocols/htb.py
index 10008cf..468e8a2 100644
|
a
|
b
|
|
| 192 | 192 | sweepInterval = 60 * 20 |
| 193 | 193 | |
| 194 | 194 | def getBucketKey(self, transport): |
| 195 | | return transport.getPeer()[1] |
| | 195 | return transport.getPeer().host |
| 196 | 196 | |
| 197 | 197 | |
| 198 | 198 | class FilterByServer(HierarchicalBucketFilter): |
diff --git a/twisted/protocols/policies.py b/twisted/protocols/policies.py
index b9c0661..44f7617 100644
|
a
|
b
|
|
| 398 | 398 | return WrappingFactory.buildProtocol(self, addr) |
| 399 | 399 | |
| 400 | 400 | def unregisterProtocol(self, p): |
| 401 | | peerHost = p.getPeer()[1] |
| | 401 | peerHost = p.getPeer().host |
| 402 | 402 | self.peerConnections[peerHost] -= 1 |
| 403 | 403 | if self.peerConnections[peerHost] == 0: |
| 404 | 404 | del self.peerConnections[peerHost] |