Explorar o código

use yaml for loading lable info instead of json

Jason DeTiberus %!s(int64=9) %!d(string=hai) anos
pai
achega
5a50546e89
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      filter_plugins/oo_filters.py

+ 1 - 1
filter_plugins/oo_filters.py

@@ -311,7 +311,7 @@ class FilterModule(object):
                 return False
 
             if isinstance(labels, basestring):
-                labels = json.loads(labels)
+                labels = yaml.safe_load(labels)
             if not isinstance(labels, dict):
                 raise errors.AnsibleFilterError(
                     "failed expected node labels to be a dict or serializable to a dict"