BIND 10 trac2710, updated. 3c1fc036f79481a10628e3f841666c35a0b7b823 [2710] address review comments
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Mar 11 16:37:41 UTC 2013
The branch, trac2710 has been updated
via 3c1fc036f79481a10628e3f841666c35a0b7b823 (commit)
from 1090b92f9a37d021c445b046b9245861df6ca36f (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 3c1fc036f79481a10628e3f841666c35a0b7b823
Author: Jelte Jansen <jelte at isc.org>
Date: Mon Mar 11 17:36:40 2013 +0100
[2710] address review comments
- set 'file used' to None if set to nonexistent file
- remove couple of unnecessary test value checks
- slightly more efficient temporary file write
-----------------------------------------------------------------------
Summary of changes:
src/bin/cmdctl/cmdctl.py.in | 2 +-
src/bin/cmdctl/tests/cmdctl_test.py | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/cmdctl/cmdctl.py.in b/src/bin/cmdctl/cmdctl.py.in
index a5eff8c..5591b21 100755
--- a/src/bin/cmdctl/cmdctl.py.in
+++ b/src/bin/cmdctl/cmdctl.py.in
@@ -512,7 +512,7 @@ class SecureHTTPServer(socketserver_mixin.NoPollMixIn,
# If the file does not exist, set accounts to empty, and return
if not os.path.exists(accounts_file):
self._user_infos = {}
- self.__accounts_file = accounts_file
+ self.__accounts_file = None
self.__accounts_file_mtime = 0
return
diff --git a/src/bin/cmdctl/tests/cmdctl_test.py b/src/bin/cmdctl/tests/cmdctl_test.py
index c11d1a4..114df0c 100644
--- a/src/bin/cmdctl/tests/cmdctl_test.py
+++ b/src/bin/cmdctl/tests/cmdctl_test.py
@@ -99,8 +99,7 @@ class TmpTextFile:
def __enter__(self):
with open(self.__path, 'w') as f:
- for line in self.__contents:
- f.write(line)
+ f.write("\n".join(self.__contents))
def __exit__(self, type, value, traceback):
os.unlink(self.__path)
@@ -503,7 +502,6 @@ class TestSecureHTTPServer(unittest.TestCase):
def test_create_user_info_changing_file_time(self):
self.assertEqual(0, len(self.server._user_infos))
- self.assertFalse('root' in self.server._user_infos)
# Create a file
accounts_file = BUILD_FILE_PATH + 'new_file.csv'
@@ -533,7 +531,6 @@ class TestSecureHTTPServer(unittest.TestCase):
Check that the accounts file is re-read if the file name is different
"""
self.assertEqual(0, len(self.server._user_infos))
- self.assertFalse('root' in self.server._user_infos)
# Create two files
accounts_file1 = BUILD_FILE_PATH + 'new_file.csv'
More information about the bind10-changes
mailing list