Explorar el Código

Merge pull request #624 from abutcher/merge-facts

Avoid attribute error in merge facts
Brenton Leanhardt hace 9 años
padre
commit
d865b2a903
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      roles/openshift_facts/library/openshift_facts.py

+ 1 - 1
roles/openshift_facts/library/openshift_facts.py

@@ -644,7 +644,7 @@ def merge_facts(orig, new):
     facts = dict()
     for key, value in orig.iteritems():
         if key in new:
-            if isinstance(value, dict):
+            if isinstance(value, dict) and isinstance(new[key], dict):
                 facts[key] = merge_facts(value, new[key])
             else:
                 facts[key] = copy.copy(new[key])