Commit cf9919b7 authored by Vladimir Rusinov's avatar Vladimir Rusinov

Fix PEP8 warnings in weblate/accounts/avatar.py.

parent c2b92076
......@@ -42,9 +42,9 @@ PLURAL_SEPARATOR = '\x1e\x1e'
def avatar_for_email(email, size=80):
'''
"""
Generates url for avatar.
'''
"""
# Safely handle blank email
if email == '':
......@@ -86,9 +86,9 @@ def avatar_for_email(email, size=80):
def get_avatar_image(user, size):
'''
"""
Returns avatar image from cache (if available) or downloads it.
'''
"""
cache_key = u'avatar-img-{0}-{1}'.format(
user.username,
......@@ -123,9 +123,9 @@ def get_avatar_image(user, size):
def download_avatar_image(user, size):
'''
"""
Downloads avatar image from remote server.
'''
"""
url = avatar_for_email(user.email, size)
request = urllib2.Request(url)
request.timeout = 0.5
......@@ -139,9 +139,9 @@ def download_avatar_image(user, size):
def get_user_display(user, icon=True, link=False):
'''
"""
Nicely formats user for display.
'''
"""
# Did we get any user?
if user is None:
# None user, probably remotely triggered action
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment