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

Commit 589215b

Browse files
committed
Check is not None in safe get
1 parent 4c1ab55 commit 589215b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/kube_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def __len__(self):
494494

495495
def safe_get(self, key):
496496
if (isinstance(self.value, list) and isinstance(key, int) or
497-
key in self.value):
497+
self.value is not None and key in self.value):
498498
return self.value[key]
499499

500500
def __getitem__(self, key):

0 commit comments

Comments
 (0)