projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3504: CollectionReader accepts arvados object collection uuids. 'arv-put' sets
[arvados.git]
/
sdk
/
python
/
arvados
/
commands
/
put.py
diff --git
a/sdk/python/arvados/commands/put.py
b/sdk/python/arvados/commands/put.py
index 71e31b24184079a00ccfc69ecccdd75b83e97350..eec63c01d4c4bf557c4c5080438b0bb164bdc67e 100644
(file)
--- a/
sdk/python/arvados/commands/put.py
+++ b/
sdk/python/arvados/commands/put.py
@@
-448,17
+448,17
@@
def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
collection = arvados.api().collections().create(
body={
'manifest_text': writer.manifest_text(),
collection = arvados.api().collections().create(
body={
'manifest_text': writer.manifest_text(),
+ 'owner_uuid': project_link['tail_uuid']
},
).execute()
},
).execute()
- # Print the locator (uuid) of the new collection.
output = collection['uuid']
if project_link is not None:
output = collection['uuid']
if project_link is not None:
+ # Update collection name
try:
if 'name' in collection:
arvados.api().collections().update(uuid=output,
try:
if 'name' in collection:
arvados.api().collections().update(uuid=output,
- body={"owner_uuid": project_link["tail_uuid"],
- "name": project_link["name"]}).execute()
+ body={"name": project_link["name"]}).execute()
else:
create_project_link(output, project_link)
except apiclient.errors.Error as error:
else:
create_project_link(output, project_link)
except apiclient.errors.Error as error:
@@
-467,6
+467,7
@@
def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
error))
status = 1
error))
status = 1
+ # Print the locator (uuid) of the new collection.
stdout.write(output)
if not output.endswith('\n'):
stdout.write('\n')
stdout.write(output)
if not output.endswith('\n'):
stdout.write('\n')