From c2a94ae0720211c0f99ebb91eb59f9898b7fd8e1 Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Wed, 3 May 2017 21:12:55 +0000 Subject: [PATCH] fixes in script --- scripts/github-oracle/github_oracle.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/github-oracle/github_oracle.py b/scripts/github-oracle/github_oracle.py index f688976..ea0d63d 100644 --- a/scripts/github-oracle/github_oracle.py +++ b/scripts/github-oracle/github_oracle.py @@ -18,10 +18,10 @@ class GitHubAPI: response = urllib2.urlopen(req) rjs = json.load(response) try: - logmsg("OAuth success:" + rjs['scope'] + "/" + rjs['token_type'] + logmsg("OAuth success:" + rjs['scope'] + "/" + rjs['token_type']) return rjs['access_token'] except KeyError: - logmsg("OAuth error " + rjs['error'] + ":" + rjs['error_description'] + logmsg("OAuth error " + rjs['error'] + ":" + rjs['error_description']) logmsg(rjs['error_uri']) sys.exit("403 Forbidden") @@ -281,9 +281,9 @@ api = GitHubAPI() if api.checkLimit(5): if script == 'update-new': repository = GitRepository(api, args[0]) - if argn > 1: + if len(args) > 1: repository.setBranch(args[1]) - if argn > 2: + if len(args) > 2: repository.setHead(args[2]) repository.updateCommits() print "["+json.dumps(repository.data['id'])+",",