BIND 10 trac1542, updated. 67b1031ec37365288502d0894cccddec7e12657e Changelog

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jan 26 14:42:04 UTC 2012


The branch, trac1542 has been updated
  discards  eb62cd8541566bc386a278db211a6a2c94eedee9 (commit)

This update discarded existing revisions and left the branch pointing at
a previous point in the repository history.

 * -- * -- N (67b1031ec37365288502d0894cccddec7e12657e)
            \
             O -- O -- O (eb62cd8541566bc386a278db211a6a2c94eedee9)

The removed revisions are not necessarilly gone - if another reference
still refers to them they will stay in the repository.

No new revisions were added by this update.

Summary of changes:
 src/lib/python/isc/bind10/sockcreator.py           |   14 ++------------
 .../python/isc/bind10/tests/sockcreator_test.py    |    5 ++---
 2 files changed, 4 insertions(+), 15 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/bind10/sockcreator.py b/src/lib/python/isc/bind10/sockcreator.py
index c0d6f6e..c681d07 100644
--- a/src/lib/python/isc/bind10/sockcreator.py
+++ b/src/lib/python/isc/bind10/sockcreator.py
@@ -47,16 +47,6 @@ class CreatorError(Exception):
         self.fatal = fatal
         self.errno = errno
 
-class CreatorSocketError(CreatorError):
-    """
-    Exception for socket creator when it can't create a requested socket.
-
-    It is always non-fatal with the meaning of CreatorError and always
-    has the errno.
-    """
-    def __init__(self, message, errno):
-        CreatorError.__init__(self, message, False, errno)
-
 class Parser:
     """
     This class knows the sockcreator language. It creates commands, sends them
@@ -159,8 +149,8 @@ class Parser:
                     raise CreatorError('Unknown error cause' + str(answer), True)
                 logger.error(BIND10_SOCKET_ERROR, cause, errno[0],
                              os.strerror(errno[0]))
-                raise CreatorSocketError('Error creating socket on ' + cause,
-                                         errno[0])
+                raise CreatorError('Error creating socket on ' + cause, False,
+                                   errno[0])
             else:
                 self.__socket = None
                 logger.fatal(BIND10_SOCKCREATOR_BAD_RESPONSE, answer)
diff --git a/src/lib/python/isc/bind10/tests/sockcreator_test.py b/src/lib/python/isc/bind10/tests/sockcreator_test.py
index 2e5d33b..d97d21b 100644
--- a/src/lib/python/isc/bind10/tests/sockcreator_test.py
+++ b/src/lib/python/isc/bind10/tests/sockcreator_test.py
@@ -23,8 +23,7 @@ import socket
 from isc.net.addr import IPAddr
 import isc.log
 from libutil_io_python import send_fd
-from isc.bind10.sockcreator import Parser, CreatorError, WrappedSocket, \
-    CreatorSocketError
+from isc.bind10.sockcreator import Parser, CreatorError, WrappedSocket
 
 class FakeCreator:
     """
@@ -217,7 +216,7 @@ class ParserTests(unittest.TestCase):
         try:
             parser.get_socket(IPAddr('0.0.0.0'), 0, 'UDP')
             self.fail("Not raised")
-        except CreatorSocketError as ce:
+        except CreatorError as ce:
             self.assertTrue(creator.all_used())
             # Is the exception correct?
             self.assertFalse(ce.fatal)




More information about the bind10-changes mailing list