python3 - 2to3 + miscell obvious tweaks
[sfa.git] / sfa / client / client_helper.py
index fd15c0f..8098319 100644 (file)
@@ -41,10 +41,8 @@ def sfa_users_arg(records, slice_record):
         # note that reg-email is not yet available
         pl_fields = ['email', 'person_id',
                      'first_name', 'last_name', 'key_ids']
-        nitos_fields = ['email', 'user_id']
-        extra_fields = list(set(pl_fields).union(set(nitos_fields)))
         # try to fill all these in
-        for field in extra_fields:
+        for field in pl_fields:
             if field in record:
                 user[field] = record[field]
         users.append(user)
@@ -57,7 +55,7 @@ def sfa_to_pg_users_arg(users):
     new_users = []
     fields = ['urn', 'keys']
     for user in users:
-        new_user = dict([item for item in user.items()
+        new_user = dict([item for item in list(user.items())
                          if item[0] in fields])
         new_users.append(new_user)
     return new_users