From 6b321066f015e8181f4938aa1328a461be096333 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 27 May 2018 08:52:26 +0200 Subject: [PATCH] [mod] import at the debigging of the file, it's not yunohost codebase --- add_or_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/add_or_update.py b/add_or_update.py index 57abeda0..ff1be0b5 100755 --- a/add_or_update.py +++ b/add_or_update.py @@ -5,6 +5,7 @@ import sys import json from urllib2 import urlopen +from urlparse import urlparse states = { 1: "notworking", @@ -50,7 +51,6 @@ 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: - from urlparse import urlparse parsed_uri = urlparse( url ) base_url = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri) # Try with gitlab api