File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- import os
15
+ from os . path import exists , expanduser
16
16
17
17
from .config_exception import ConfigException
18
18
from .incluster_config import load_incluster_config
@@ -33,8 +33,7 @@ def load_config(**kwargs):
33
33
can be passed to either load_kube_config or
34
34
load_incluster_config functions.
35
35
"""
36
- if "kube_config_path" in kwargs .keys () or os .path .exists (
37
- KUBE_CONFIG_DEFAULT_LOCATION ):
36
+ if "kube_config_path" in kwargs .keys () or exists (expanduser (KUBE_CONFIG_DEFAULT_LOCATION )):
38
37
load_kube_config (** kwargs )
39
38
else :
40
39
print (
Original file line number Diff line number Diff line change 45
45
pass
46
46
47
47
EXPIRY_SKEW_PREVENTION_DELAY = datetime .timedelta (minutes = 5 )
48
- KUBE_CONFIG_DEFAULT_LOCATION = os .path . expanduser ( os . environ .get ('KUBECONFIG' , '~/.kube/config' ) )
48
+ KUBE_CONFIG_DEFAULT_LOCATION = os .environ .get ('KUBECONFIG' , '~/.kube/config' )
49
49
ENV_KUBECONFIG_PATH_SEPARATOR = ';' if platform .system () == 'Windows' else ':'
50
50
_temp_files = {}
51
51
You can’t perform that action at this time.
0 commit comments