Rev 5263: Merge sftp-leaks into catch-them-all in file:///home/vila/src/bzr/experimental/leaking-tests/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jun 10 18:09:18 BST 2010
At file:///home/vila/src/bzr/experimental/leaking-tests/
------------------------------------------------------------
revno: 5263 [merge]
revision-id: v.ladeuil+lp at free.fr-20100610170918-uo063229g1nqqlbf
parent: v.ladeuil+lp at free.fr-20100607194424-tgvcpfi24swvpili
parent: v.ladeuil+lp at free.fr-20100610170917-bvip5inihpcqybb5
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: catch-them-all
timestamp: Thu 2010-06-10 19:09:18 +0200
message:
Merge sftp-leaks into catch-them-all
modified:
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
-------------- next part --------------
=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py 2010-06-05 17:06:04 +0000
+++ b/bzrlib/osutils.py 2010-06-10 17:01:42 +0000
@@ -2038,7 +2038,8 @@
# We don't use nor handle the timeout though
def connect_socket(address, timeout=None):
err = socket.error('getaddrinfo returns an empty list')
- for res in socket.getaddrinfo(*address):
+ host, port = address
+ for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
sock = None
try:
@@ -2046,11 +2047,11 @@
sock.connect(sa)
return sock
- except socket.error, err:
+ except exc_class, err:
# 'err' is now the most recent error
if sock is not None:
sock.close()
- raise err
+ raise exc_class, err
def dereference_path(path):
More information about the bazaar-commits
mailing list