X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a2cfa777daee2cf7775c8a24cde16fdc2f48060d..45ff1f04cf0a562b870e18ca13b02d914db6bcb3:/sdk/python/bin/arv-get diff --git a/sdk/python/bin/arv-get b/sdk/python/bin/arv-get index 1025b8c626..30beedc2e7 100755 --- a/sdk/python/bin/arv-get +++ b/sdk/python/bin/arv-get @@ -124,14 +124,21 @@ if not get_prefix: logger.error('Local file %s already exists' % args.destination) sys.exit(1) with open(args.destination, 'wb') as f: - f.write(arvados.Keep.get(collection)) + try: + c = arvados.api('v1').collections().get( + uuid=collection).execute() + manifest = c['manifest_text'] + except Exception as e: + logging.warning( + "API lookup failed for collection %s (%s: %s)" % + (collection, type(e), str(e))) + manifest = arvados.Keep.get(collection) + f.write(manifest) sys.exit(0) except arvados.errors.NotFoundError as e: logger.error(e) sys.exit(1) -get_prefix = get_prefix.replace(' ', '\\040') - reader = arvados.CollectionReader(collection) # Scan the collection. Make an array of (stream, file, local