Commit c7769f61 authored by Likun Zhang's avatar Likun Zhang
Browse files

Remove unused print and append the character '.' to the zone name which doesn't end with it.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac289@2612 e5f2f494-b856-4b98-b285-d166d9295462
parent ea33f606
......@@ -133,13 +133,11 @@ class NotifyOut:
return addr_list
def send_notify(self, zone_name):
print('=============begin to send notify', zone_name, '===', self._notify_infos)
print(self._notify_infos)
if zone_name[len(zone_name) - 1] != '.':
zone_name += '.'
if zone_name not in self._notify_infos:
print('=============not eixst')
return
print('=============begin to send notify')
with self._lock:
if (self.notify_num >= _MAX_NOTIFY_NUM) or (zone_name in self._notifying_zones):
if zone_name not in self._waiting_zones:
......
......@@ -58,11 +58,11 @@ class TestNotifyOut(unittest.TestCase):
os.unlink(self._db_file.name)
def test_send_notify(self):
self._notify.send_notify('cn.')
self._notify.send_notify('cn')
self.assertEqual(self._notify.notify_num, 1)
self.assertEqual(self._notify._notifying_zones[0], 'cn.')
self._notify.send_notify('com.')
self._notify.send_notify('com')
self.assertEqual(self._notify.notify_num, 2)
self.assertEqual(self._notify._notifying_zones[1], 'com.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment