X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d81ea65da05119d5c6480d373b5d42bbee8ae1ad..ac22ee15271c0d0c144d9ec42e17da965168e213:/sdk/python/bin/arv-get diff --git a/sdk/python/bin/arv-get b/sdk/python/bin/arv-get index 7f02cf73df..0d403d1036 100755 --- a/sdk/python/bin/arv-get +++ b/sdk/python/bin/arv-get @@ -126,6 +126,7 @@ if args.r and not get_prefix: todo = [] todo_bytes = 0 +api_client = arvados.api('v1') if not get_prefix: try: if not args.n: @@ -133,15 +134,15 @@ if not get_prefix: abort('Local file %s already exists.' % (args.destination,)) with open(args.destination, 'wb') as f: try: - c = arvados.api('v1').collections().get( - uuid=collection).execute() + c = api_client.collections().get(uuid=collection).execute() manifest = c['manifest_text'] except Exception as e: logger.warning( "Collection %s not found. " + "Trying to fetch directly from Keep (deprecated).", collection) - manifest = arvados.Keep.get(collection) + manifest = arvados.KeepClient( + api_client=api_client).get(collection) f.write(manifest) sys.exit(0) except arvados.errors.NotFoundError as e: