From 2e4aae948a7bedbad6f1d67cfd0ca43a888119e2 2012-06-11 18:48:37 From: Matthias BUSSONNIER Date: 2012-06-11 18:48:37 Subject: [PATCH] some fixes --- diff --git a/tools/gh_api.py b/tools/gh_api.py index 1f2dd2b..fbb9bf6 100644 --- a/tools/gh_api.py +++ b/tools/gh_api.py @@ -84,7 +84,7 @@ def get_pull_request(project, num, github_api=3): url = "https://api.github.com/repos/{project}/pulls/{num}".format(project=project, num=num) response = requests.get(url) response.raise_for_status() - if httpv2 : + if github_api == 2 : return json.loads(response.text)['pull'] return json.loads(response.text) @@ -99,6 +99,6 @@ def get_pulls_list(project, github_api=3): url = "http://github.com/api/v2/json/pulls/{project}".format(project=project) response = requests.get(url) response.raise_for_status() - if httpv2 : + if github_api == 2 : return json.loads(response.text)['pulls'] return json.loads(response.text)