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 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- import os
15+ from os . path import exists , expanduser
1616
1717from .config_exception import ConfigException
1818from .incluster_config import load_incluster_config
@@ -33,8 +33,7 @@ def load_config(**kwargs):
3333 can be passed to either load_kube_config or
3434 load_incluster_config functions.
3535 """
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 )):
3837 load_kube_config (** kwargs )
3938 else :
4039 print (
Original file line number Diff line number Diff line change 4545 pass
4646
4747EXPIRY_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' )
4949ENV_KUBECONFIG_PATH_SEPARATOR = ';' if platform .system () == 'Windows' else ':'
5050_temp_files = {}
5151
You can’t perform that action at this time.
0 commit comments