#NEWLINE# def read_from_fd( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# chunk = self . socket . recv ( self . read_chunk_size ) #NEWLINE# #UNINDENT# except socket . error as e : #NEWLINE# #INDENT# if ( e . args [ 0 ] in ( errno . EWOULDBLOCK , errno . EAGAIN ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# if ( not chunk ) : #NEWLINE# #INDENT# self . close ( ) #NEWLINE# return None #NEWLINE# #UNINDENT# return chunk