[ARVADOS] updated: 921c13a95c2d13c94de74601e5bc26e5b0c71c31
git at public.curoverse.com
git at public.curoverse.com
Tue Mar 25 17:02:08 EDT 2014
Summary of changes:
sdk/cli/bin/arv | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
via 921c13a95c2d13c94de74601e5bc26e5b0c71c31 (commit)
via 4e26baca96b4cb9e2145475bf31f18a0ffad2c26 (commit)
from e102a3b3100577137def302ecd0f810bc46b808a (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 921c13a95c2d13c94de74601e5bc26e5b0c71c31
Merge: 4e26bac e102a3b
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Mar 25 17:01:59 2014 -0400
Merge branch 'master' of git.clinicalfuture.com:arvados
commit 4e26baca96b4cb9e2145475bf31f18a0ffad2c26
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Mar 25 17:01:45 2014 -0400
Fixes #2047: Catch connection errors in 'arv' and report the error nicely
instead of dumping a backtrace.
diff --git a/sdk/cli/bin/arv b/sdk/cli/bin/arv
index 89dee69..f453675 100755
--- a/sdk/cli/bin/arv
+++ b/sdk/cli/bin/arv
@@ -89,7 +89,7 @@ begin
rescue LoadError
abort <<-EOS
-Please install all required gems:
+Please install all required gems:
gem install activesupport andand curb google-api-client json oj trollop
@@ -148,8 +148,13 @@ class ArvadosClient < Google::APIClient
end
end
-client = ArvadosClient.new(:host => ENV['ARVADOS_API_HOST'], :application_name => 'arvados-cli', :application_version => '1.0')
-arvados = client.discovered_api('arvados', ENV['ARVADOS_API_VERSION'])
+begin
+ client = ArvadosClient.new(:host => ENV['ARVADOS_API_HOST'], :application_name => 'arvados-cli', :application_version => '1.0')
+ arvados = client.discovered_api('arvados', ENV['ARVADOS_API_VERSION'])
+rescue Exception => e
+ puts "Failed to connect to Arvados API server: #{e}"
+ exit 1
+end
def to_boolean(s)
!!(s =~ /^(true|t|yes|y|1)$/i)
@@ -170,8 +175,8 @@ def help_methods(discovery_document, resource, method=nil)
end
banner += "\n"
STDERR.puts banner
-
- if not method.nil? and method != '--help' then
+
+ if not method.nil? and method != '--help' then
Trollop::die ("Unknown method #{method.inspect} " +
"for resource #{resource.inspect}")
end
@@ -194,7 +199,7 @@ def help_resources(discovery_document, resource)
banner += "\n"
STDERR.puts banner
- if not resource.nil? and resource != '--help' then
+ if not resource.nil? and resource != '--help' then
Trollop::die "Unknown resource type #{resource.inspect}"
end
exit 255
@@ -320,7 +325,7 @@ when
curl.headers['Accept'] = 'text/plain'
curl.headers['Authorization'] = "OAuth2 #{ENV['ARVADOS_API_TOKEN']}"
if ENV['ARVADOS_API_HOST_INSECURE']
- curl.ssl_verify_peer = false
+ curl.ssl_verify_peer = false
curl.ssl_verify_host = false
end
if global_opts[:verbose]
@@ -364,5 +369,3 @@ else
puts results['uuid']
end
end
-
-
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list