Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b192b0 authored by Roger Chui's avatar Roger Chui Committed by Ricardo Cerqueira
Browse files

make compatible with github v3 api

Change-Id: Iff6f1f9099cdc5d2b49e04000b5fe3d04aa5d7e4
parent 79f9818d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -13,10 +13,11 @@ repositories = []

page = 1
while True:
    result = json.loads(urllib2.urlopen("http://github.com/api/v2/json/repos/show/CyanogenMod?page=%d" % page).read())
    if len(result['repositories']) == 0:
    result = json.loads(urllib2.urlopen("https://api.github.com/users/CyanogenMod/repos?page=%d" % page).read())
    if len(result) == 0:
        break
    repositories = repositories + result['repositories']
    for res in result:
        repositories.append(res)
    page = page + 1

for repository in repositories: