Skip to content

Commit 6834bf7

Browse files
author
Hermes Ojeda Ruiz
committed
Fixed a little detail to get the avatar
1 parent 446e537 commit 6834bf7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

githubnotifier.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def get_github_user_info(username):
6666
except (urllib2.URLError, httplib.HTTPException):
6767
# Create a 'fake' user object in case of network errors
6868
user = {'login': username}
69-
69+
70+
7071
else:
7172
# Use cached userinfo
7273
fp = open(info_cache, 'r')
@@ -82,7 +83,7 @@ def get_github_user_info(username):
8283
else:
8384
gravatar_url = 'http://www.gravatar.com/avatar/?s=48'
8485
try:
85-
avatar_data = urllib2.urlopen(user['avatar_url']).read()
86+
avatar_data = urllib2.urlopen(gravatar_url).read()
8687

8788
# Cache the image
8889
fp = open(user['avatar_path'], 'wb')

0 commit comments

Comments
 (0)