X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/28d591b7d82143f35016681b14dfc841b9ef04b2..83f05664d99a7d80b2d2ae9c0517004cbfb5d00d:/sdk/python/arvados/commands/get.py diff --git a/sdk/python/arvados/commands/get.py b/sdk/python/arvados/commands/get.py index c061c70f0e..bb421def61 100755 --- a/sdk/python/arvados/commands/get.py +++ b/sdk/python/arvados/commands/get.py @@ -17,7 +17,6 @@ import arvados.util as util from arvados._version import __version__ -api_client = None logger = logging.getLogger('arvados.arv-get') parser = argparse.ArgumentParser( @@ -146,8 +145,6 @@ def parse_arguments(arguments, stdout, stderr): return args def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr): - global api_client - if stdout is sys.stdout and hasattr(stdout, 'buffer'): # in Python 3, write to stdout as binary stdout = stdout.buffer @@ -158,8 +155,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr): request_id = arvados.util.new_request_id() logger.info('X-Request-Id: '+request_id) - if api_client is None: - api_client = arvados.api('v1', request_id=request_id) + api_client = arvados.api('v1', request_id=request_id) r = re.search(r'^(.*?)(/.*)?$', args.locator) col_loc = r.group(1) @@ -290,7 +286,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr): if todo_bytes==0 else 100.0*out_bytes/todo_bytes))) elif args.batch_progress: - stderr.write('%s %d read %d total\n' % + stderr.write('%s %d read %d total %d\n' % (sys.argv[0], os.getpid(), out_bytes, todo_bytes)) if digestor: