projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 3153-auto-setup-user
[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 e4b763ad0847cc420b3d8803b14dcbab124d24ff..8cf56b6a38ab864143ba2bac9927e5e22ea4129d 100644
(file)
--- a/
sdk/python/arvados/commands/put.py
+++ b/
sdk/python/arvados/commands/put.py
@@
-453,20
+453,26
@@
def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
collection = api_client.collections().create(
body={
'manifest_text': writer.manifest_text(),
collection = api_client.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:
try:
- create_project_link(output, project_link)
+ if 'name' in collection:
+ arvados.api().collections().update(uuid=output,
+ body={"name": project_link["name"]}).execute()
+ else:
+ create_project_link(output, project_link)
except apiclient.errors.Error as error:
print >>stderr, (
"arv-put: Error adding Collection to project: {}.".format(
error))
status = 1
except apiclient.errors.Error as error:
print >>stderr, (
"arv-put: Error adding Collection to project: {}.".format(
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')