def download(objects):
def exists(object):<EOL><INDENT>if os.path.exists(TMPDIR + '<STR_LIT:/>' + filename):<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>msg = '<STR_LIT>' % (filename, TMPDIR)<EOL>logger.warning(msg)<EOL>stdout_message('<STR_LIT>' % (inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], msg))<EOL>return False<EOL><DEDENT><DEDENT>try:<EOL><INDENT>for file_path in objects:<EOL><INDENT>filename = file_path.split('<STR_LIT:/>')[-<NUM_LIT:1>]<EOL>r = urllib.request.urlretrieve(file_path, TMPDIR + '<STR_LIT:/>' + filename)<EOL>if not exists(filename):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>except urllib.error.HTTPError as e:<EOL><INDENT>logger.exception(<EOL>'<STR_LIT>' %<EOL>(inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>], file_path, str(e), e.read()))<EOL>raise e<EOL><DEDENT>return True<EOL>
Retrieve remote file object