[github] Use default HTTP request timeout

This commit is contained in:
nemunaire 2015-11-27 19:07:54 +01:00
parent 707131023a
commit 274836e39a

View File

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