[ARVADOS] updated: f845c0645d9136a1e4ad993ecf34a156367e73b7
git at public.curoverse.com
git at public.curoverse.com
Tue Apr 29 11:10:25 EDT 2014
Summary of changes:
sdk/ruby/lib/arvados.rb | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
via f845c0645d9136a1e4ad993ecf34a156367e73b7 (commit)
from 7bc20af4935fee1caa566e86a074022f0b60d166 (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 f845c0645d9136a1e4ad993ecf34a156367e73b7
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Apr 29 11:10:11 2014 -0400
Fix error reporting, catch "=foo" in config file, add dev doc.
diff --git a/sdk/ruby/lib/arvados.rb b/sdk/ruby/lib/arvados.rb
index eedee6e..567423f 100644
--- a/sdk/ruby/lib/arvados.rb
+++ b/sdk/ruby/lib/arvados.rb
@@ -142,6 +142,10 @@ class Arvados
$stderr.puts "#{File.split($0).last} #{$$}: #{message}" if @@debuglevel >= verbosity
end
+ def debuglog *args
+ self.class.debuglog *args
+ end
+
def config(config_file_path="~/.config/arvados/settings.conf")
return @@config if @@config
@@ -157,6 +161,10 @@ class Arvados
# specifies a _HOST without asking for _INSECURE, we certainly
# shouldn't give the config file a chance to create a
# system-wide _INSECURE state for this user.
+ #
+ # Note: If we start using additional configuration settings from
+ # this file in the future, we might have to read the file anyway
+ # instead of returning here.
return (@@config = config)
end
@@ -173,15 +181,15 @@ class Arvados
var.strip!
val.strip!
# allow environment settings to override config files.
- if val
+ if !var.empty? and val
config[var] ||= val
else
- warn "#{expanded_path}: #{lineno}: could not parse `#{line}'"
+ debuglog "#{expanded_path}: #{lineno}: could not parse `#{line}'", 0
end
end
end
- rescue
- debuglog "HOME environment variable (#{ENV['HOME']}) not set, not using #{config_file_path}", 0
+ rescue StandardError => e
+ debuglog "Ignoring error reading #{config_file_path}: #{e}", 0
end
@@config = config
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list