Skip to content

Commit 7199c14

Browse files
committed
Change KUBE_CONFIG_DEFAULT_LOCATION to use pathlib.Path.home instead of hard-coded "~". This is a more "Pythonic" way of setting that value.
1 parent fdc9907 commit 7199c14

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

config/kube_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import json
2020
import logging
2121
import os
22+
import pathlib
2223
import platform
2324
import subprocess
2425
import tempfile
@@ -45,7 +46,7 @@
4546
pass
4647

4748
EXPIRY_SKEW_PREVENTION_DELAY = datetime.timedelta(minutes=5)
48-
KUBE_CONFIG_DEFAULT_LOCATION = os.environ.get('KUBECONFIG', '~/.kube/config')
49+
KUBE_CONFIG_DEFAULT_LOCATION = os.environ.get('KUBECONFIG', f'{pathlib.Path.home()}/.kube/config')
4950
ENV_KUBECONFIG_PATH_SEPARATOR = ';' if platform.system() == 'Windows' else ':'
5051
_temp_files = {}
5152

0 commit comments

Comments
 (0)