BIND 10 trac2439, updated. f7c0e1bf2a90711cd6df426b17465eedafaade00 [2439] Add missing isinstance

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Jan 28 12:53:39 UTC 2013


The branch, trac2439 has been updated
       via  f7c0e1bf2a90711cd6df426b17465eedafaade00 (commit)
       via  4dd6c4cc1c15974d1009c489f2e26e987479ea77 (commit)
       via  f94444fe1c05288c12f6255bb3552a8c8166745a (commit)
       via  d4032a6703f672811b92811c10998d8eb718eec6 (commit)
      from  2a742e19fb8c128456c90b9ae679d2a4806313d3 (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 f7c0e1bf2a90711cd6df426b17465eedafaade00
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 28 13:51:45 2013 +0100

    [2439] Add missing isinstance
    
    We check the result is of correct type, so use isinstance. It is unclear
    how the original code could pass, though.

commit 4dd6c4cc1c15974d1009c489f2e26e987479ea77
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 28 13:51:13 2013 +0100

    [2439] (minor) Comment fix
    
    Fix a code in comment. It wouldn't work, but it was saying what not to
    do anyway.

commit f94444fe1c05288c12f6255bb3552a8c8166745a
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 28 13:44:13 2013 +0100

    [2439] Fix logging placeholders
    
    The XFRIN_INVALID_ZONE_DATA was numbered from %2, not from %1.

commit d4032a6703f672811b92811c10998d8eb718eec6
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Jan 28 13:40:32 2013 +0100

    [2439] (minor) Exception docstrings
    
    Clarify one exception and document one old exception.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/xfrin/xfrin.py.in                    |    7 +++++--
 src/bin/xfrin/xfrin_messages.mes             |    2 +-
 src/lib/python/isc/xfrin/tests/diff_tests.py |    4 ++--
 3 files changed, 8 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/xfrin/xfrin.py.in b/src/bin/xfrin/xfrin.py.in
index f73e966..8daf62f 100755
--- a/src/bin/xfrin/xfrin.py.in
+++ b/src/bin/xfrin/xfrin.py.in
@@ -96,12 +96,15 @@ class XfrinProtocolError(Exception):
 
 class XfrinZoneError(Exception):
     '''
-    An exception raised when the received zone contain invalid data.
+    An exception raised when the received zone is broken enough to be unusable.
     '''
     pass
 
 class XfrinZoneUptodate(Exception):
-    '''TBD
+    '''
+    Thrown when the zone is already up to date, so there's no need to download
+    the zone. This is not really an error case (but it's still an exceptional
+    condition and the control flow is different than usual).
     '''
     pass
 
diff --git a/src/bin/xfrin/xfrin_messages.mes b/src/bin/xfrin/xfrin_messages.mes
index 6f3e464..e34aafb 100644
--- a/src/bin/xfrin/xfrin_messages.mes
+++ b/src/bin/xfrin/xfrin_messages.mes
@@ -77,7 +77,7 @@ is not equal to the requested SOA serial.
 There was an error importing the python DNS module pydnspp. The most
 likely cause is a PYTHONPATH problem.
 
-% XFRIN_INVALID_ZONE_DATA zone %2 received from %3 contains invalid data
+% XFRIN_INVALID_ZONE_DATA zone %1 received from %2 contains invalid data
 The zone was received, but it failed sanity validation. The previous version
 of zone (if any is available) will be used. Look for previous
 XFRIN_ZONE_INVALID messages to see the exact problem(s).
diff --git a/src/lib/python/isc/xfrin/tests/diff_tests.py b/src/lib/python/isc/xfrin/tests/diff_tests.py
index 0a33f67..f013cd5 100644
--- a/src/lib/python/isc/xfrin/tests/diff_tests.py
+++ b/src/lib/python/isc/xfrin/tests/diff_tests.py
@@ -1098,7 +1098,7 @@ class DiffTest(unittest.TestCase):
             '''
             Empty init. The base class's __init__ can't be called,
             so we need to provide our own to shadow it -- and make sure
-            not to call the parent().__init__().
+            not to call the super().__init__().
             '''
             pass
 
@@ -1128,7 +1128,7 @@ class DiffTest(unittest.TestCase):
         self.assertEqual(1, len(self.__data_operations))
         self.assertEqual('add', self.__data_operations[0][0])
         # Check the returned one is actually RRsetCollection
-        self.assertTrue(collection, self.Collection)
+        self.assertTrue(isinstance(collection, self.Collection))
         # The collection is just the mock from above, so this doesn't do much
         # testing, but we check that the mock got through and didn't get hurt.
         self.assertIsNone(collection.find(Name('example.org'), RRClass.IN(),



More information about the bind10-changes mailing list