correct bug linked to change of work of grains.get: grains.item previously returned a dict of pair key value , get returns directly the value
authorPaul Tonelli <paul.tonelli@logilab.fr>
Thu, 18 Apr 2013 19:00:48 +0200
changeset 121 2a34626f73a5
parent 120 f97e78e5b74d
child 122 5b091aab6bd3
correct bug linked to change of work of grains.get: grains.item previously returned a dict of pair key value , get returns directly the value
_modules/vm_create.py
--- a/_modules/vm_create.py	Thu Apr 18 18:49:32 2013 +0200
+++ b/_modules/vm_create.py	Thu Apr 18 19:00:48 2013 +0200
@@ -56,7 +56,7 @@
     for o_type in object_types:
         object_id[o_type] = __salt__['grains.get'](o_type + '_id')
         if object_id[o_type]:
-            object_id[o_type] = object_id[o_type].values()[0]
+            object_id[o_type] = object_id[o_type]
         else:
             o_path = _find_objects(path, o_type)
             if len(o_path) == 1: