Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Simplify example/handlers.py AuthHandler._to_user_models_attrs #4

Closed
erichiggins opened this issue Sep 17, 2012 · 1 comment
Closed

Comments

@erichiggins
Copy link
Collaborator

Here's how I did it.

def _to_user_model_attrs(self, data, attrs_map):
  """Get the needed information from the provider dataset."""
  user_attrs = {}
  for k, v in attrs_map.iteritems():
    attr = (v, data.get(k)) if isinstance(v, str) else v(data.get(k))
    user_attrs.setdefault(*attr)

  return user_attrs
@x1ddos
Copy link
Owner

x1ddos commented Sep 18, 2012

Closed by 391f732
Thanks!

@x1ddos x1ddos closed this as completed Sep 18, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants