Merge lp:~spiv/ubuntu/lucid/paramiko/address-families-579530-lucid into lp:ubuntu/lucid/paramiko

Proposed by Andrew Bennetts
Status: Work in progress
Proposed branch: lp:~spiv/ubuntu/lucid/paramiko/address-families-579530-lucid
Merge into: lp:ubuntu/lucid/paramiko
Diff against target: 44 lines (+17/-4)
2 files modified
debian/changelog (+7/-0)
paramiko/transport.py (+10/-4)
To merge this branch: bzr merge lp:~spiv/ubuntu/lucid/paramiko/address-families-579530-lucid
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+25297@code.launchpad.net

Description of the change

Fix bug 579530, which is affecting bzr.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

So, this looks ok to me. Its in main, which means I can't apply it. paramiko has simple-patchsys included, but the patch should be applied precisely by upstream, so I don't really care either way about how the change is recorded. Viva le VCS.

review: Approve

Unmerged revisions

13. By Andrew Bennetts

Apply proposed fix for LP: #579530.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2009-12-16 08:15:36 +0000
+++ debian/changelog 2010-05-14 07:52:29 +0000
@@ -1,3 +1,10 @@
1paramiko (1.7.6-2ubuntu1) lucid; urgency=low
2
3 * Try connecting to each available address family until one succeeds.
4 (LP: #579530)
5
6 -- Andrew Bennetts <andrew.bennetts@canonical.com> Fri, 14 May 2010 09:41:51 +0200
7
1paramiko (1.7.6-2) unstable; urgency=low8paramiko (1.7.6-2) unstable; urgency=low
29
3 * debian/control: Fix last remaining lintian warning10 * debian/control: Fix last remaining lintian warning
411
=== modified file 'paramiko/transport.py'
--- paramiko/transport.py 2009-12-16 08:15:36 +0000
+++ paramiko/transport.py 2010-05-14 07:52:29 +0000
@@ -285,15 +285,21 @@
285 if type(sock) is tuple:285 if type(sock) is tuple:
286 # connect to the given (host, port)286 # connect to the given (host, port)
287 hostname, port = sock287 hostname, port = sock
288 reason = 'No suitable address family'
288 for (family, socktype, proto, canonname, sockaddr) in socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM):289 for (family, socktype, proto, canonname, sockaddr) in socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM):
289 if socktype == socket.SOCK_STREAM:290 if socktype == socket.SOCK_STREAM:
290 af = family291 af = family
291 addr = sockaddr292 addr = sockaddr
292 break293 sock = socket.socket(af, socket.SOCK_STREAM)
294 try:
295 sock.connect((hostname, port))
296 except socket.error, e:
297 reason = str(e)
298 else:
299 break
293 else:300 else:
294 raise SSHException('No suitable address family for %s' % hostname)301 raise SSHException(
295 sock = socket.socket(af, socket.SOCK_STREAM)302 'Unable to connect to %s: %s' % (hostname, reason))
296 sock.connect((hostname, port))
297 # okay, normal socket-ish flow here...303 # okay, normal socket-ish flow here...
298 threading.Thread.__init__(self)304 threading.Thread.__init__(self)
299 self.setDaemon(True)305 self.setDaemon(True)

Subscribers

People subscribed via source and target branches

to all changes: