diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-11-01 05:15:55 +0000 |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-11-01 05:15:55 +0000 |
commit | 87d86e09b5ef3fc7e007c8a6f5f0bc54e003b089 (patch) | |
tree | e7bcde6f1549a98060beeabb07ea6b1bab33fdff /Lib/test/test_multiprocessing.py | |
parent | 75fed81c756df510f8db24cac7fb2fcbcfea60cd (diff) | |
download | cpython-git-87d86e09b5ef3fc7e007c8a6f5f0bc54e003b089.tar.gz |
Merged revisions 86077 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86077 | brian.curtin | 2010-11-01 00:10:44 -0500 (Mon, 01 Nov 2010) | 3 lines
Fix some ResourceErrors.
Use a context manager for os.popen and explicitly close a socket.
........
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 693026227f..ac02d5ab25 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -1259,7 +1259,11 @@ class _TestManagerRestart(BaseTestCase): authkey = os.urandom(32) manager = QueueManager( address=('localhost', 0), authkey=authkey, serializer=SERIALIZER) - addr = manager.get_server().address + srvr = manager.get_server() + addr = srvr.address + # Close the connection.Listener socket which gets opened as a part + # of manager.get_server(). It's not needed for the test. + srvr.listener.close() manager.start() p = self.Process(target=self._putter, args=(manager.address, authkey)) |