1515import os
1616from .config_exception import ConfigException
1717from .incluster_config import load_incluster_config
18- from .kube_config import (list_kube_config_contexts , load_kube_config ,
19- load_kube_config_from_dict , new_client_from_config , KUBE_CONFIG_DEFAULT_LOCATION )
18+ from .kube_config import (
19+ list_kube_config_contexts ,
20+ load_kube_config ,
21+ load_kube_config_from_dict ,
22+ new_client_from_config ,
23+ KUBE_CONFIG_DEFAULT_LOCATION )
2024
2125
2226def load_config (** kwargs ):
@@ -28,9 +32,11 @@ def load_config(**kwargs):
2832 :param kwargs: A combination of all possible kwargs that can be passed to either load_kube_config or
2933 load_incluster_config functions.
3034 """
31- if "kube_config_path" in kwargs .keys () or os .path .exists (KUBE_CONFIG_DEFAULT_LOCATION ):
35+ if "kube_config_path" in kwargs .keys () or os .path .exists (
36+ KUBE_CONFIG_DEFAULT_LOCATION ):
3237 load_kube_config (** kwargs )
3338 else :
34- print ("kube_config_path not provided and default location ({0}) does not exist. "
35- "Using inCluster Config. This might not work." .format (KUBE_CONFIG_DEFAULT_LOCATION ))
39+ print (
40+ "kube_config_path not provided and default location ({0}) does not exist. "
41+ "Using inCluster Config. This might not work." .format (KUBE_CONFIG_DEFAULT_LOCATION ))
3642 load_incluster_config (** kwargs )
0 commit comments