[ARVADOS] updated: 8c5ea8b50cb16a893f19256575ca3bcf4bac5be3
git at public.curoverse.com
git at public.curoverse.com
Thu Jun 26 09:46:39 EDT 2014
Summary of changes:
sdk/cli/bin/arv | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
via 8c5ea8b50cb16a893f19256575ca3bcf4bac5be3 (commit)
from 632617ca32cb0be73a0a7cfee5a19b2255c7154c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 8c5ea8b50cb16a893f19256575ca3bcf4bac5be3
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Jun 26 09:46:36 2014 -0400
Reused variable 'n' for two different things. Oops.
diff --git a/sdk/cli/bin/arv b/sdk/cli/bin/arv
index 259b38a..a69ba03 100755
--- a/sdk/cli/bin/arv
+++ b/sdk/cli/bin/arv
@@ -144,8 +144,8 @@ def check_subcommands client, arvados, subcommand, global_opts, remaining_opts
end
def arv_edit client, arvados, global_opts, remaining_opts
- n = remaining_opts.shift
- if n.nil? or n == "-h" or n == "--help"
+ uuid = remaining_opts.shift
+ if uuid.nil? or uuid == "-h" or uuid == "--help"
puts head_banner
puts "Usage: arv edit [uuid] [fields...]\n\n"
puts "Fetch the specified Arvados object, select the specified fields, \n"
@@ -162,9 +162,9 @@ def arv_edit client, arvados, global_opts, remaining_opts
# determine controller
- m = /([a-z0-9]{5})-([a-z0-9]{5})-([a-z0-9]{15})/.match n
+ m = /([a-z0-9]{5})-([a-z0-9]{5})-([a-z0-9]{15})/.match uuid
if !m
- if /^[a-f0-9]{32}/.match n
+ if /^[a-f0-9]{32}/.match uuid
abort "Arvados collections are not editable."
else
abort "#{n} does not appear to be an Arvados uuid"
@@ -189,7 +189,7 @@ def arv_edit client, arvados, global_opts, remaining_opts
api_method = 'arvados.' + rsc + '.get'
result = client.execute(:api_method => eval(api_method),
- :parameters => {"uuid" => n},
+ :parameters => {"uuid" => uuid},
:authenticated => false,
:headers => {
authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
@@ -215,7 +215,7 @@ def arv_edit client, arvados, global_opts, remaining_opts
require 'tempfile'
- tmp = Tempfile.new([n, "." + global_opts[:format]])
+ tmp = Tempfile.new([uuid, "." + global_opts[:format]])
tmp.write(content)
tmp.close
@@ -276,7 +276,7 @@ def arv_edit client, arvados, global_opts, remaining_opts
begin
result = client.execute(:api_method => eval(api_method),
- :parameters => {"uuid" => n},
+ :parameters => {"uuid" => uuid},
:body => { rsc.singularize => dumped },
:authenticated => false,
:headers => {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list