#NEWLINE# def _fetch_file( url ) : #NEWLINE# #INDENT# ' Fetches a file from the internet. Retry a few times before\n    giving up on failure.\n    ' #NEWLINE# logging . warn ( ( 'Downloading %s' % url ) ) #NEWLINE# for tries in range ( 4 ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return urlopen ( url , timeout = 5.0 ) . read ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# logging . warn ( ( 'Error while fetching file: %s' % str ( e ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# raise IOError ( ( 'Unable to download %r. Perhaps there is a no internet connection? If there is, please report this problem.' % url ) )