#NEWLINE# def get( self , subpath ) : #NEWLINE# #INDENT# key = self . _bucket . get_key ( self . _get_keyname ( subpath ) ) #NEWLINE# if ( key is not None ) : #NEWLINE# #INDENT# t = TemporaryFile ( ) #NEWLINE# retry_count = 0 #NEWLINE# max_retry_count = defaults [ 'storage_aws_read_retry_count' ] #NEWLINE# while ( retry_count < max_retry_count ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# retry_count = ( retry_count + 1 ) #NEWLINE# t . write ( key . read ( ) ) #NEWLINE# t . seek ( 0 ) #NEWLINE# return t #NEWLINE# #UNINDENT# except httplib . IncompleteRead as e : #NEWLINE# #INDENT# log . warn ( ( 'Caught IncompleteRead, retrying (%d/%d)' % ( retry_count , max_retry_count ) ) ) #NEWLINE# log . warn ( ( '%s' % self . message ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None