#NEWLINE# def next( self ) : #NEWLINE# #INDENT# if self . stop_iteration : #NEWLINE# #INDENT# self . fd . close ( ) #NEWLINE# raise StopIteration #NEWLINE# #UNINDENT# block_size = self . chunk_size #NEWLINE# if ( ( self . bytes_read + self ) > ( self . end_block - self . start_block ) ) : #NEWLINE# #INDENT# block_size = ( ( self . end_block - self . start_block ) - self . bytes_read ) #NEWLINE# self . stop_iteration = True #NEWLINE# #UNINDENT# block = self . fd . read ( block_size ) #NEWLINE# self . bytes_read += block_size #NEWLINE# return block