Commit ec2ac947 authored by Aurel's avatar Aurel

add packet encoder for the no error packet


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@695 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7bd41469
......@@ -984,6 +984,9 @@ def _error(error_code, error_message):
body = pack('!HL', error_code, len(error_message)) + error_message
return Packet(ERROR, body)
def noError(message):
return _error(NO_ERROR_CODE, 'no error: ' + message)
def protocolError(error_message):
return _error(PROTOCOL_ERROR_CODE, 'protocol error: ' + error_message)
......
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