[svn] commit: r2612 - in /branches/trac289/src/lib/python/isc/notify: notify_out.py tests/notify_out_test.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Aug 2 13:43:29 UTC 2010
Author: zhanglikun
Date: Mon Aug 2 13:43:29 2010
New Revision: 2612
Log:
Remove unused print and append the character '.' to the zone name which doesn't end with it.
Modified:
branches/trac289/src/lib/python/isc/notify/notify_out.py
branches/trac289/src/lib/python/isc/notify/tests/notify_out_test.py
Modified: branches/trac289/src/lib/python/isc/notify/notify_out.py
==============================================================================
--- branches/trac289/src/lib/python/isc/notify/notify_out.py (original)
+++ branches/trac289/src/lib/python/isc/notify/notify_out.py Mon Aug 2 13:43:29 2010
@@ -133,13 +133,11 @@
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:
Modified: branches/trac289/src/lib/python/isc/notify/tests/notify_out_test.py
==============================================================================
--- branches/trac289/src/lib/python/isc/notify/tests/notify_out_test.py (original)
+++ branches/trac289/src/lib/python/isc/notify/tests/notify_out_test.py Mon Aug 2 13:43:29 2010
@@ -58,11 +58,11 @@
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.')
More information about the bind10-changes
mailing list