BIND 10 trac1828, updated. 74b4b2f998f9512b2a326e81062da9099d1eeaf4 [1828] Cleanup code by using with (for accept_sock)
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 14 07:58:37 UTC 2012
The branch, trac1828 has been updated
via 74b4b2f998f9512b2a326e81062da9099d1eeaf4 (commit)
from ff9dd7da0902101332312526c4b52d11f18650ba (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 74b4b2f998f9512b2a326e81062da9099d1eeaf4
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Jun 14 13:28:20 2012 +0530
[1828] Cleanup code by using with (for accept_sock)
-----------------------------------------------------------------------
Summary of changes:
.../isc/util/cio/tests/socketsession_test.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/util/cio/tests/socketsession_test.py b/src/lib/python/isc/util/cio/tests/socketsession_test.py
index 47c67e5..eba9fa2 100644
--- a/src/lib/python/isc/util/cio/tests/socketsession_test.py
+++ b/src/lib/python/isc/util/cio/tests/socketsession_test.py
@@ -237,11 +237,10 @@ class TestForwarder(unittest.TestCase):
s = socket.socket(socket.AF_UNIX, SOCK_STREAM, 0)
s.setblocking(False)
s.connect(TEST_UNIX_FILE)
- accept_sock = self.accept_forwarder()
- receiver = SocketSessionReceiver(accept_sock)
- s.close()
- self.assertRaises(SocketSessionError, receiver.pop)
- accept_sock.close()
+ with self.accept_forwarder() as accept_sock:
+ receiver = SocketSessionReceiver(accept_sock)
+ s.close()
+ self.assertRaises(SocketSessionError, receiver.pop)
class TestReceiver(unittest.TestCase):
# We only check a couple of failure cases on construction. Valid cases
More information about the bind10-changes
mailing list