Просмотр исходного кода

Add key existing check to collect facts for rolebidings

Kenjiro Nakayama 7 лет назад
Родитель
Сommit
e3417ec5af
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      roles/openshift_logging/library/openshift_logging_facts.py

+ 1 - 1
roles/openshift_logging/library/openshift_logging_facts.py

@@ -288,7 +288,7 @@ class OpenshiftLoggingFacts(OCBaseCommand):
             return
         for item in role["subjects"]:
             comp = self.comp(item["name"])
-            if comp is not None and namespace == item["namespace"]:
+            if comp is not None and namespace == item.get("namespace"):
                 self.add_facts_for(comp, "rolebindings", "logging-elasticsearch-view-role", dict())
 
     # pylint: disable=no-self-use, too-many-return-statements