diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-08 23:03:00 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-08 23:03:00 (GMT) |
commit | 71a28a91744b5cf6f881769300818232750de6d2 (patch) | |
tree | 812d08c39479a8a291c9f0d5a949589af4c07e39 /Lib/multiprocessing/connection.py | |
parent | 370092071b34da3ed1c2301857e12158794fbe10 (diff) | |
download | cpython-71a28a91744b5cf6f881769300818232750de6d2.zip cpython-71a28a91744b5cf6f881769300818232750de6d2.tar.gz cpython-71a28a91744b5cf6f881769300818232750de6d2.tar.bz2 |
Rebind locally the globals which can be looked up at shutdown
(to avoid the warnings seen on a buildbot)
Diffstat (limited to 'Lib/multiprocessing/connection.py')
-rw-r--r-- | Lib/multiprocessing/connection.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index ede2908..2661898 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -290,8 +290,8 @@ if win32: """ _buffered = b'' - def _close(self): - win32.CloseHandle(self._handle) + def _close(self, _CloseHandle=win32.CloseHandle): + _CloseHandle(self._handle) def _send_bytes(self, buf): overlapped = win32.WriteFile(self._handle, buf, overlapped=True) @@ -376,13 +376,13 @@ class Connection(_ConnectionBase): """ if win32: - def _close(self): - win32.closesocket(self._handle) + def _close(self, _close=win32.closesocket): + _close(self._handle) _write = win32.send _read = win32.recv else: - def _close(self): - os.close(self._handle) + def _close(self, _close=os.close): + _close(self._handle) _write = os.write _read = os.read |