Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Commit

Permalink
fix cfg is none, load kube config error
Browse files Browse the repository at this point in the history
Signed-off-by: zhu hui <[email protected]>
  • Loading branch information
ACXLM committed Jun 2, 2020
1 parent 49ec060 commit 3ff79da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,8 @@ def load_config(self, path):
for item in ('clusters', 'contexts', 'users'):
config_merged[item] = []
self.config_merged = ConfigNode(path, config_merged, path)

for item in ('clusters', 'contexts', 'users'):
self._merge(item, config.get(item, {}), path)
self._merge(item, config.get(item, []) or [], path)
self.config_files[path] = config

def _merge(self, item, add_cfg, path):
Expand Down

0 comments on commit 3ff79da

Please sign in to comment.