diff options
Diffstat (limited to 'bitbake/lib/bblayers/layerindex.py')
-rw-r--r-- | bitbake/lib/bblayers/layerindex.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bblayers/layerindex.py b/bitbake/lib/bblayers/layerindex.py index 3c39d8a79e..10ad718eba 100644 --- a/bitbake/lib/bblayers/layerindex.py +++ b/bitbake/lib/bblayers/layerindex.py | |||
@@ -1,10 +1,10 @@ | |||
1 | import argparse | 1 | import argparse |
2 | import httplib | 2 | import http.client |
3 | import json | 3 | import json |
4 | import logging | 4 | import logging |
5 | import os | 5 | import os |
6 | import subprocess | 6 | import subprocess |
7 | import urlparse | 7 | import urllib.parse |
8 | 8 | ||
9 | from bblayers.action import ActionPlugin | 9 | from bblayers.action import ActionPlugin |
10 | 10 | ||
@@ -24,12 +24,12 @@ class LayerIndexPlugin(ActionPlugin): | |||
24 | def get_json_data(self, apiurl): | 24 | def get_json_data(self, apiurl): |
25 | proxy_settings = os.environ.get("http_proxy", None) | 25 | proxy_settings = os.environ.get("http_proxy", None) |
26 | conn = None | 26 | conn = None |
27 | _parsedurl = urlparse.urlparse(apiurl) | 27 | _parsedurl = urllib.parse.urlparse(apiurl) |
28 | path = _parsedurl.path | 28 | path = _parsedurl.path |
29 | query = _parsedurl.query | 29 | query = _parsedurl.query |
30 | 30 | ||
31 | def parse_url(url): | 31 | def parse_url(url): |
32 | parsedurl = urlparse.urlparse(url) | 32 | parsedurl = urllib.parse.urlparse(url) |
33 | if parsedurl.netloc[0] == '[': | 33 | if parsedurl.netloc[0] == '[': |
34 | host, port = parsedurl.netloc[1:].split(']', 1) | 34 | host, port = parsedurl.netloc[1:].split(']', 1) |
35 | if ':' in port: | 35 | if ':' in port: |
@@ -46,11 +46,11 @@ class LayerIndexPlugin(ActionPlugin): | |||
46 | 46 | ||
47 | if proxy_settings is None: | 47 | if proxy_settings is None: |
48 | host, port = parse_url(apiurl) | 48 | host, port = parse_url(apiurl) |
49 | conn = httplib.HTTPConnection(host, port) | 49 | conn = http.client.HTTPConnection(host, port) |
50 | conn.request("GET", path + "?" + query) | 50 | conn.request("GET", path + "?" + query) |
51 | else: | 51 | else: |
52 | host, port = parse_url(proxy_settings) | 52 | host, port = parse_url(proxy_settings) |
53 | conn = httplib.HTTPConnection(host, port) | 53 | conn = http.client.HTTPConnection(host, port) |
54 | conn.request("GET", apiurl) | 54 | conn.request("GET", apiurl) |
55 | 55 | ||
56 | r = conn.getresponse() | 56 | r = conn.getresponse() |