BIND 10 trac1828, updated. 6ad0070daba5438c84dd869afe260538bae2c55e [1828] a couple of suggested clarification comments
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 14 18:16:36 UTC 2012
The branch, trac1828 has been updated
via 6ad0070daba5438c84dd869afe260538bae2c55e (commit)
via 1fff16e186c477efe4c179c034849f97af6e3f33 (commit)
from 74b4b2f998f9512b2a326e81062da9099d1eeaf4 (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 6ad0070daba5438c84dd869afe260538bae2c55e
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Thu Jun 14 11:16:00 2012 -0700
[1828] a couple of suggested clarification comments
commit 1fff16e186c477efe4c179c034849f97af6e3f33
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Thu Jun 14 11:09:47 2012 -0700
[1828] style fix: folded a long line.
-----------------------------------------------------------------------
Summary of changes:
src/bin/ddns/ddns.py.in | 6 ++++--
src/bin/ddns/tests/ddns_test.py | 4 +++-
.../python/isc/bind10/tests/sockcreator_test.py | 3 ++-
3 files changed, 9 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/ddns/ddns.py.in b/src/bin/ddns/ddns.py.in
index 44385ea..ffbca60 100755
--- a/src/bin/ddns/ddns.py.in
+++ b/src/bin/ddns/ddns.py.in
@@ -150,10 +150,12 @@ class DDNSServer:
Perform any cleanup that is necessary when shutting down the server.
Do NOT call this to initialize shutdown, use trigger_shutdown().
- Currently, it only causes the ModuleCCSession to send a message that
- this module is stopping.
'''
+ # tell the ModuleCCSession to send a message that this module is
+ # stopping.
self._cc.send_stopping()
+ # make sure any open socket is explicitly closed, per Python
+ # convention.
self._listen_socket.close()
def accept(self):
diff --git a/src/bin/ddns/tests/ddns_test.py b/src/bin/ddns/tests/ddns_test.py
index 25cf43b..75816ac 100755
--- a/src/bin/ddns/tests/ddns_test.py
+++ b/src/bin/ddns/tests/ddns_test.py
@@ -145,8 +145,10 @@ class TestDDNSServer(unittest.TestCase):
self.assertIsNone(self.__hook_called)
# Now make sure the clear_socket really works
ddns.clear_socket()
- ddnss.shutdown_cleanup()
self.assertFalse(os.path.exists(ddns.SOCKET_FILE))
+ # Let ddns object complete any necessary cleanup (not part of the test,
+ # but for suppressing any warnings from the Python interpreter)
+ ddnss.shutdown_cleanup()
def test_config_handler(self):
# Config handler does not do anything yet, but should at least
diff --git a/src/lib/python/isc/bind10/tests/sockcreator_test.py b/src/lib/python/isc/bind10/tests/sockcreator_test.py
index 5e844f3..115064b 100644
--- a/src/lib/python/isc/bind10/tests/sockcreator_test.py
+++ b/src/lib/python/isc/bind10/tests/sockcreator_test.py
@@ -305,7 +305,8 @@ class WrapTests(unittest.TestCase):
send_fd(t1.fileno(), p1.fileno())
p1.close()
- with socket.fromfd(t2.read_fd(), socket.AF_UNIX, socket.SOCK_STREAM) as p1:
+ with socket.fromfd(t2.read_fd(), socket.AF_UNIX,
+ socket.SOCK_STREAM) as p1:
# Now, pass some data trough the socket
p1.send(b'A')
data = p2.recv(1)
More information about the bind10-changes
mailing list