2to3 -f has_key
[sfa.git] / sfa / client / client_helper.py
index 15f4a2d..6e91706 100644 (file)
@@ -5,7 +5,7 @@
 # it seems terribly wrong that the client should decide to use PG- or PL- related code
 # esp. in a context where we're trying to have more and more kinds of testbeds involved
 #
-# also, the 'users' filed that CreateSliver is expecting (the key point here is to get this right)
+# also, the 'users' field that CreateSliver is expecting (the key point here is to get this right)
 # is specified to have at least a urn and a list of keys, both of these being supported natively
 # in the sfa db
 # So long story short, it seems to me that we should have a common code that fills in 'urn' and 'keys'
@@ -41,7 +41,7 @@ def sfa_users_arg (records, slice_record):
         extra_fields = list ( set(pl_fields).union(set(nitos_fields)))
         # try to fill all these in
         for field in extra_fields:
-            if record.has_key(field): user[field]=record[field]
+            if field in record: user[field]=record[field]
         users.append(user)
 
     return users