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

Commit

Permalink
Check is not None in safe get
Browse files Browse the repository at this point in the history
  • Loading branch information
qlemaire22 committed Sep 6, 2019
1 parent 4c1ab55 commit 589215b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def __len__(self):

def safe_get(self, key):
if (isinstance(self.value, list) and isinstance(key, int) or
key in self.value):
self.value is not None and key in self.value):
return self.value[key]

def __getitem__(self, key):
Expand Down

0 comments on commit 589215b

Please sign in to comment.