File tree 1 file changed +10
-4
lines changed
src/codeflare_sdk/cluster
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:
165
165
home_directory = os .path .expanduser ("~" )
166
166
if config_path == None and api_client == None :
167
167
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 )
169
172
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 )
171
177
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? "
174
180
)
175
181
176
182
if config_path != None and api_client == None :
You can’t perform that action at this time.
0 commit comments