mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-13 07:11:08 +01:00
Added the ability to specify size when fetching a gravatar URL.
This commit is contained in:
parent
329bb45947
commit
3ed1cf3618
1 changed files with 2 additions and 2 deletions
|
@ -21,13 +21,13 @@ import format
|
|||
import hashlib
|
||||
import urllib
|
||||
|
||||
def get_url(email):
|
||||
def get_url(email, size=20):
|
||||
md5hash = hashlib.md5(email.lower().strip()).hexdigest()
|
||||
base_url = "http://www.gravatar.com/avatar/" + md5hash
|
||||
params = None
|
||||
|
||||
if format.get_selected() == "html":
|
||||
params = {"default": "identicon", "size": 20}
|
||||
params = {"default": "identicon", "size": size}
|
||||
elif format.get_selected() == "xml":
|
||||
params = {"default": "identicon"}
|
||||
|
||||
|
|
Loading…
Reference in a new issue