2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 14:35:29 +00:00

[2617] editorial cleanups for MsgQCloseOnReceive pydoc

This commit is contained in:
JINMEI Tatuya
2013-01-31 11:00:09 -08:00
parent 878c361337
commit 677e990f61

View File

@@ -71,18 +71,19 @@ SPECFILE_LOCATION = SPECFILE_PATH + "/msgq.spec"
class MsgQReceiveError(Exception): pass class MsgQReceiveError(Exception): pass
class MsgQCloseOnReceive(Exception): class MsgQCloseOnReceive(Exception):
'''Exception raised when reading data from a socket results in "shutdown. '''Exception raised when reading data from a socket results in 'shutdown'.
This can be either getting 0-length data or via ECONNRESET socket.error This happens when msgq received 0-length data. This class holds whether
exception. This class holds whether it happens in the middle of reading it happens in the middle of reading (i.e. after reading some) via
(i.e. after reading some) via partial_read parameter, which is set to True partial_read parameter, which is set to True if and only if so.
if and only if so. This will be used by an upper layer cathing the This will be used by an upper layer catching the exception to distinguish
exception to distinguish severity of the event. the severity of the event.
"''' "'''
def __init__(self, reason, partial_read): def __init__(self, reason, partial_read):
self.partial_read = partial_read self.partial_read = partial_read
self.__reason = reason self.__reason = reason
def __str__(self): def __str__(self):
return self.__reason return self.__reason