1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

[mod] pep8

This commit is contained in:
Laurent Peuch 2018-05-27 08:52:33 +02:00
parent 6b321066f0
commit 59209731e9

View file

@ -51,7 +51,7 @@ if __name__ == '__main__':
git_data = json.load(urlopen("https://api.github.com/repos/%(owner)s/%(repo)s/commits" % {"owner": owner, "repo": repo}))
revision = git_data[0]["sha"]
else:
parsed_uri = urlparse( url )
parsed_uri = urlparse(url)
base_url = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri)
# Try with gitlab api
git_data = json.load(urlopen("%(base_url)sapi/v4/projects/%(owner)s%%2F%(repo)s/repository/commits/HEAD" % {"base_url": base_url, "owner": owner, "repo": repo}))