Skip to content

Commit

Permalink
the map can positively return None, so we need to fall back on '' aft…
Browse files Browse the repository at this point in the history
…er the dict.get(), not within it
  • Loading branch information
ejucovy committed Aug 18, 2012
1 parent 9ef4789 commit bd16b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userpictures/providers/gravatar.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_src(self, req, username, size):
email = ''
if '@' not in username:
if username != 'anonymous':
email = self.email_map.get(username, '')
email = self.email_map.get(username) or ''
else:
author_info = self._long_author_re.match(username)
if author_info:
Expand Down

0 comments on commit bd16b2d

Please sign in to comment.