Commit a53b51dd authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove the unused 'InternalError' code/exception/handler.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1349 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 30666e41
......@@ -359,10 +359,6 @@ class EventHandler(object):
def handleBrokenNodeDisallowedError(self, conn, packet, message):
raise RuntimeError, 'broken node disallowed error: %s' % (message,)
def handleInternalError(self, conn, packet, message):
self.peerBroken(conn)
conn.close()
def handleNoError(self, conn, packet, message):
logging.debug("no error message : %s" % (message))
......@@ -446,7 +442,6 @@ class EventHandler(object):
d[ErrorCodes.TID_NOT_FOUND] = self.handleTidNotFound
d[ErrorCodes.PROTOCOL_ERROR] = self.handleProtocolError
d[ErrorCodes.BROKEN_NODE] = self.handleBrokenNodeDisallowedError
d[ErrorCodes.INTERNAL_ERROR] = self.handleInternalError
return d
......@@ -252,7 +252,6 @@ class ErrorCodes(Enum):
TID_NOT_FOUND = Enum.Item(3)
PROTOCOL_ERROR = Enum.Item(4)
BROKEN_NODE = Enum.Item(5)
INTERNAL_ERROR = Enum.Item(6)
ErrorCodes = ErrorCodes()
class ClusterStates(Enum):
......@@ -1054,9 +1053,6 @@ def noError(message):
def protocolError(error_message):
return _error(ErrorCodes.PROTOCOL_ERROR, 'protocol error: ' + error_message)
def internalError(error_message):
return _error(ErrorCodes.INTERNAL_ERROR, 'internal error: ' + error_message)
def notReady(error_message):
return _error(ErrorCodes.NOT_READY, 'not ready: ' + error_message)
......
......@@ -54,12 +54,6 @@ class ProtocolTests(NeoTestBase):
self.assertEqual(error_code, ErrorCodes.PROTOCOL_ERROR)
self.assertEqual(error_msg, "protocol error: bad protocol")
def test_04_internalError(self):
p = protocol.internalError("bad internal")
error_code, error_msg = p.decode()
self.assertEqual(error_code, ErrorCodes.INTERNAL_ERROR)
self.assertEqual(error_msg, "internal error: bad internal")
def test_05_notReady(self):
p = protocol.notReady("wait")
error_code, error_msg = p.decode()
......
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