[ARVADOS] created: 1.3.0-2344-g28014072d

Git user git at public.arvados.org
Thu Mar 12 04:15:50 UTC 2020


        at  28014072de9e26a07e943595a6c278148c0bb88d (commit)


commit 28014072de9e26a07e943595a6c278148c0bb88d
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Thu Mar 12 00:15:16 2020 -0400

    16221: Fix test for config endpoint.
    
    x['configs'] raises KeyError on an old discovery doc -- test
    x.get('configs', False) instead.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/sdk/python/arvados/util.py b/sdk/python/arvados/util.py
index 9e0a31783..dcc0417c1 100644
--- a/sdk/python/arvados/util.py
+++ b/sdk/python/arvados/util.py
@@ -421,7 +421,7 @@ def new_request_id():
     return rid
 
 def get_config_once(svc):
-    if not svc._rootDesc.get('resources')['configs']:
+    if not svc._rootDesc.get('resources').get('configs', False):
         # Old API server version, no config export endpoint
         return {}
     if not hasattr(svc, '_cached_config'):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list