Loading tools/roomservice.py +12 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import sys import urllib2 import json import re import netrc, base64 from xml.etree import ElementTree product = sys.argv[1]; Loading @@ -23,9 +24,19 @@ if not depsonly: repositories = [] authtuple = netrc.netrc().authenticators("api.github.com") if authtuple: githubauth = base64.encodestring('%s:%s' % (authtuple[0], authtuple[2])).replace('\n', '') else: githubauth = None page = 1 while not depsonly: result = json.loads(urllib2.urlopen("https://api.github.com/users/CyanogenMod/repos?page=%d" % page).read()) githubreq = urllib2.Request("https://api.github.com/users/CyanogenMod/repos?per_page=100&page=%d" % page) if githubauth: githubreq.add_header("Authorization","Basic %s" % githubauth) result = json.loads(urllib2.urlopen(githubreq).read()) if len(result) == 0: break for res in result: Loading Loading
tools/roomservice.py +12 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import sys import urllib2 import json import re import netrc, base64 from xml.etree import ElementTree product = sys.argv[1]; Loading @@ -23,9 +24,19 @@ if not depsonly: repositories = [] authtuple = netrc.netrc().authenticators("api.github.com") if authtuple: githubauth = base64.encodestring('%s:%s' % (authtuple[0], authtuple[2])).replace('\n', '') else: githubauth = None page = 1 while not depsonly: result = json.loads(urllib2.urlopen("https://api.github.com/users/CyanogenMod/repos?page=%d" % page).read()) githubreq = urllib2.Request("https://api.github.com/users/CyanogenMod/repos?per_page=100&page=%d" % page) if githubauth: githubreq.add_header("Authorization","Basic %s" % githubauth) result = json.loads(urllib2.urlopen(githubreq).read()) if len(result) == 0: break for res in result: Loading