'bar.txt' : 'bar',
'subdir/baz.txt' : 'baz',
}):
- c = collection.Collection()
+ api = arvados.api()
+ c = collection.Collection(api_client=api)
for path, data in listitems(contents):
with c.open(path, 'wb') as f:
f.write(data)
c.save_new()
+ api.close_connections()
+
return (c.manifest_locator(),
c.portable_data_hash(),
c.manifest_text(strip=strip_manifest))