[ARVADOS] updated: fab072c1ec902a6f46c3d5a9ffb0f1c6219b45d0

git at public.curoverse.com git at public.curoverse.com
Thu Jan 16 16:04:22 EST 2014


Summary of changes:
 sdk/python/arvados/__init__.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

       via  fab072c1ec902a6f46c3d5a9ffb0f1c6219b45d0 (commit)
      from  1cb10e779a249bf82b0cf846a8976815da44eaa3 (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 fab072c1ec902a6f46c3d5a9ffb0f1c6219b45d0
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jan 16 13:02:13 2014 -0800

    Do not attempt to load authentication config file unless it exists.
    
    closes #1915

diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py
index 406d3ed..dacdba8 100644
--- a/sdk/python/arvados/__init__.py
+++ b/sdk/python/arvados/__init__.py
@@ -27,10 +27,11 @@ import apiclient.discovery
 class ArvadosConfig(dict):
     def __init__(self, config_file):
         dict.__init__(self)
-        with open(config_file, "r") as f:
-            for config_line in f:
-                var, val = config_line.rstrip().split('=', 2)
-                self[var] = val
+        if os.path.exists(config_file):
+            with open(config_file, "r") as f:
+                for config_line in f:
+                    var, val = config_line.rstrip().split('=', 2)
+                    self[var] = val
         for var in os.environ:
             if var.startswith('ARVADOS_'):
                 self[var] = os.environ[var]

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list