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

Commit 509a4c2

Browse files
author
Quentin Lemaire
committed
Fix safe get safety condition
1 parent 4c1ab55 commit 509a4c2

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
@@ -493,7 +493,7 @@ def __len__(self):
493493
return len(self.value)
494494

495495
def safe_get(self, key):
496-
if (isinstance(self.value, list) and isinstance(key, int) or
496+
if (isinstance(self.value, list) and isinstance(key, int) and
497497
key in self.value):
498498
return self.value[key]
499499

0 commit comments

Comments
 (0)