File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
src/codeflare_sdk/cluster Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -165,12 +165,18 @@ def config_check() -> str:
165165 home_directory = os .path .expanduser ("~" )
166166 if config_path == None and api_client == None :
167167 if os .path .isfile ("%s/.kube/config" % home_directory ):
168- config .load_kube_config ()
168+ try :
169+ config .load_kube_config ()
170+ except Exception as e :
171+ print (e )
169172 elif "KUBERNETES_PORT" in os .environ :
170- config .load_incluster_config ()
173+ try :
174+ config .load_incluster_config ()
175+ except Exception as e :
176+ print (e )
171177 else :
172- print (
173- "Unable to load config file or in cluster configuration, try specifying a config file path with load_kube_config() "
178+ raise PermissionError (
179+ "Action not permitted, have you put in correct/up-to-date auth credentials? "
174180 )
175181
176182 if config_path != None and api_client == None :
You can’t perform that action at this time.
0 commit comments