Skip to contentSkip to conversation

identity: make work with python 3

PATCH New Mark Asselstine 1 participant 1 message Dec 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 identity: make work with python 3

dict.has_key has been deprecated for a while and officiall removed in python 3, instead we need to use 'key in'.

---
 meta-openstack/classes/identity.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-openstack/classes/identity.bbclass +2 -2
index 3601f52..4ea7305 100644
@@ -105,7 +105,7 @@ def usercreate_param(d, pkg):
 
     for key, value in param_defaults.items():
         if key in param.split():
-            if param_flags.has_key(key):
+            if key in param_flags:
                 param_defaults[key] = param_flags[key]
         else:
             param_defaults[key] = ''
@@ -135,7 +135,7 @@ def servicecreate_param(d, pkg):
 
     for key, value in param_defaults.items():
         if key in param.split():
-            if param_flags.has_key(key):
+            if key in param_flags:
                 param_defaults[key] = param_flags[key]
         else:
             param_defaults[key] = ''
Signature · 1 line
2.7.4