Browse Source

use yaml for loading lable info instead of json

Jason DeTiberus 9 năm trước cách đây
mục cha
commit
5a50546e89
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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"