Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
cf9919b7
Commit
cf9919b7
authored
Mar 30, 2014
by
Vladimir Rusinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP8 warnings in weblate/accounts/avatar.py.
parent
c2b92076
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
weblate/accounts/avatar.py
weblate/accounts/avatar.py
+8
-8
No files found.
weblate/accounts/avatar.py
View file @
cf9919b7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment