BIND 10 master, updated. f5c9c2f489e84de596aff390c498ec31fe44a5b0 [1248] fixed missing module path in error handling code.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Oct 7 22:31:54 UTC 2011


The branch, master has been updated
       via  f5c9c2f489e84de596aff390c498ec31fe44a5b0 (commit)
      from  56bd0746aef2a0b789402844e041a268b889b081 (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 f5c9c2f489e84de596aff390c498ec31fe44a5b0
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Fri Oct 7 15:30:55 2011 -0700

    [1248] fixed missing module path in error handling code.

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

Summary of changes:
 src/lib/python/isc/config/ccsession.py            |    4 ++--
 src/lib/python/isc/config/tests/ccsession_test.py |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/config/ccsession.py b/src/lib/python/isc/config/ccsession.py
index d07df1e..11a13ec 100644
--- a/src/lib/python/isc/config/ccsession.py
+++ b/src/lib/python/isc/config/ccsession.py
@@ -510,10 +510,10 @@ class UIModuleCCSession(MultiConfigData):
 
     def _remove_value_from_list(self, identifier, value):
         if value is None:
-            # we are directly removing an list index
+            # we are directly removing a list index
             id, list_indices = isc.cc.data.split_identifier_list_indices(identifier)
             if list_indices is None:
-                raise DataTypeError("identifier in remove_value() does not contain a list index, and no value to remove")
+                raise isc.cc.data.DataTypeError("identifier in remove_value() does not contain a list index, and no value to remove")
             else:
                 self.set_value(identifier, None)
         else:
diff --git a/src/lib/python/isc/config/tests/ccsession_test.py b/src/lib/python/isc/config/tests/ccsession_test.py
index 351c8e6..1c63957 100644
--- a/src/lib/python/isc/config/tests/ccsession_test.py
+++ b/src/lib/python/isc/config/tests/ccsession_test.py
@@ -747,6 +747,9 @@ class TestUIModuleCCSession(unittest.TestCase):
         self.assertEqual({'Spec2': {'item5': []}}, uccs._local_changes)
         uccs.add_value("Spec2/item5", None);
         self.assertEqual({'Spec2': {'item5': ['']}}, uccs._local_changes)
+        # Intending to empty a list element, but forget specifying the index.
+        self.assertRaises(isc.cc.data.DataTypeError,
+                          uccs.remove_value, "Spec2/item5", None)
 
     def test_add_remove_value_named_set(self):
         fake_conn = fakeUIConn()




More information about the bind10-changes mailing list