1
0
Fork 0

[github] Use default HTTP request timeout

This commit is contained in:
nemunaire 2015-11-27 19:07:54 +01:00
parent 707131023a
commit 274836e39a
1 changed files with 3 additions and 5 deletions

View File

@ -21,16 +21,14 @@ def help_full():
def info_repos(repo):
return web.getJSON("https://api.github.com/search/repositories?q=%s" %
quote(repo), timeout=10)
quote(repo))
def info_user(username):
user = web.getJSON("https://api.github.com/users/%s" % quote(username),
timeout=10)
user = web.getJSON("https://api.github.com/users/%s" % quote(username))
user["repos"] = web.getJSON("https://api.github.com/users/%s/"
"repos?sort=updated" % quote(username),
timeout=10)
"repos?sort=updated" % quote(username))
return user