def do_lzop_get(creds, url, path, decrypt, do_retry=True):
assert url.endswith('<STR_LIT>'), '<STR_LIT>'<EOL>assert url.startswith('<STR_LIT>')<EOL>conn = BlockBlobService(<EOL>creds.account_name, creds.account_key,<EOL>sas_token=creds.access_token, protocol='<STR_LIT>')<EOL>def log_wal_fetch_failures_on_error(exc_tup, exc_processor_cxt):<EOL><INDENT>def standard_detail_message(prefix='<STR_LIT>'):<EOL><INDENT>return (prefix + '<STR_LIT>'<EOL>'<STR_LIT>'.format(n=exc_processor_cxt, url=url))<EOL><DEDENT>typ, value, tb = exc_tup<EOL>del exc_tup<EOL>if issubclass(typ, socket.error):<EOL><INDENT>socketmsg = value[<NUM_LIT:1>] if isinstance(value, tuple) else value<EOL>logger.info(<EOL>msg='<STR_LIT>',<EOL>detail=standard_detail_message(<EOL>"<STR_LIT>"<EOL>.format(socketmsg)))<EOL><DEDENT>else:<EOL><INDENT>logger.warning(<EOL>msg='<STR_LIT>',<EOL>detail=standard_detail_message(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>.format(etype=typ, evalue=value,<EOL>etraceback='<STR_LIT>'.join(traceback.format_tb(tb)))))<EOL><DEDENT>del tb<EOL><DEDENT>def download():<EOL><INDENT>with files.DeleteOnError(path) as decomp_out:<EOL><INDENT>with get_download_pipeline(PIPE, decomp_out.f, decrypt) as pl:<EOL><INDENT>g = gevent.spawn(write_and_return_error, url, conn, pl.stdin)<EOL>try:<EOL><INDENT>exc = g.get()<EOL>if exc is not None:<EOL><INDENT>raise exc<EOL><DEDENT><DEDENT>except AzureMissingResourceHttpError:<EOL><INDENT>pl.abort()<EOL>logger.warning(<EOL>msg=('<STR_LIT>'<EOL>'<STR_LIT>'),<EOL>detail=('<STR_LIT>'<EOL>'<STR_LIT>'.format(url=url)),<EOL>hint=('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'))<EOL>decomp_out.remove_regardless = True<EOL>return False<EOL><DEDENT><DEDENT>logger.info(<EOL>msg='<STR_LIT>',<EOL>detail='<STR_LIT>'<EOL>.format(url=url, path=path))<EOL><DEDENT>return True<EOL><DEDENT>if do_retry:<EOL><INDENT>download = retry(<EOL>retry_with_count(log_wal_fetch_failures_on_error))(download)<EOL><DEDENT>return download()<EOL>
Get and decompress a WABS URL

This streams the content directly to lzop; the compressed version
is never stored on disk.