Prechádzať zdrojové kódy

use yaml for loading lable info instead of json

Jason DeTiberus 9 rokov pred
rodič
commit
5a50546e89
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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"