Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0d4f822 + e2ba3fb commit 62366eeCopy full SHA for 62366ee
config/__init__.py
@@ -12,7 +12,7 @@
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
15
-import os
+from os.path import exists, expanduser
16
17
from .config_exception import ConfigException
18
from .incluster_config import load_incluster_config
@@ -33,8 +33,7 @@ def load_config(**kwargs):
33
can be passed to either load_kube_config or
34
load_incluster_config functions.
35
"""
36
- if "kube_config_path" in kwargs.keys() or os.path.exists(
37
- KUBE_CONFIG_DEFAULT_LOCATION):
+ if "kube_config_path" in kwargs.keys() or exists(expanduser(KUBE_CONFIG_DEFAULT_LOCATION)):
38
load_kube_config(**kwargs)
39
else:
40
print(
0 commit comments