Rev 4746: Merge review tweak for bug #405745 in file:///home/vila/src/bzr/bugs/392127-thread-leak/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Oct 12 16:54:33 BST 2009


At file:///home/vila/src/bzr/bugs/392127-thread-leak/

------------------------------------------------------------
revno: 4746 [merge]
revision-id: v.ladeuil+lp at free.fr-20091012155432-m9235zf21lof91vg
parent: v.ladeuil+lp at free.fr-20091012120600-fx3suhz6s6ly1flm
parent: v.ladeuil+lp at free.fr-20091012154825-wm80yyjc2pd4mjrn
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 392127-thread-leak
timestamp: Mon 2009-10-12 17:54:32 +0200
message:
  Merge review tweak for bug #405745
modified:
  bzrlib/tests/http_server.py    httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
-------------- next part --------------
=== modified file 'bzrlib/tests/http_server.py'
--- a/bzrlib/tests/http_server.py	2009-10-12 12:06:00 +0000
+++ b/bzrlib/tests/http_server.py	2009-10-12 15:54:32 +0000
@@ -392,7 +392,7 @@
         self.is_shut_down.set()
 
     def connect_socket(self):
-        msg = "getaddrinfo returns an empty list"
+        err = socket.error('getaddrinfo returns an empty list')
         for res in socket.getaddrinfo(*self.server_address):
             af, socktype, proto, canonname, sa = res
             sock = None
@@ -401,10 +401,11 @@
                 sock.connect(sa)
                 return sock
 
-            except socket.error, msg:
+            except socket.error, err:
+                # 'err' is now the most recent error
                 if sock is not None:
                     sock.close()
-        raise socket.error, msg
+        raise err
 
     def join_thread(self, thread, timeout=2):
         thread.join(timeout)



More information about the bazaar-commits mailing list