I fixed a subtlish bug in Mind Traffic Control today.

I was trying to pull the email address out of user objects using user.email() … however it seemed that you might be able to have users who don’t have an email address and for who user.email() fails or returns None. Not common, I guess because user id’s are based on Google accounts (which is mainly Gmail accounts I’d assume.)

Anyway I’ve now wrapped all attempts to get user.email() in a try. But next question, what should I do instead? When I find a user without an email, what should I use to identify him or her?

Leave a comment