#NEWLINE# def recv( self , bytes = 8192 ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# data = self . conn . recv ( bytes ) #NEWLINE# if ( len ( data ) == 0 ) : #NEWLINE# #INDENT# logger . debug ( ( 'recvd 0 bytes from %s' % self . what ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# logger . debug ( ( 'rcvd %d bytes from %s' % ( len ( data ) , self . what ) ) ) #NEWLINE# return data #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# logger . exception ( ( 'Exception while receiving from connection %s %r with reason %r' % ( self . what , self . conn , e ) ) ) #NEWLINE# return None