+ try:
+ c = arvados.api('v1').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)
+ f.write(manifest)