summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-19 12:33:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:10:03 +0100
commit0a064f2216895db0181ee033a785328e704ddc0b (patch)
tree130dc1a21e7e5e511777276fbb426391782668e2
parentde6e98f272e623ce72e724e66920eecf10cb2d41 (diff)
downloadopenembedded-core-contrib-0a064f2216895db0181ee033a785328e704ddc0b.tar.gz
openembedded-core-contrib-0a064f2216895db0181ee033a785328e704ddc0b.tar.bz2
openembedded-core-contrib-0a064f2216895db0181ee033a785328e704ddc0b.zip
scripts: Fix urlparse imports for python3
Used urllib.parse instead of urlparse to make code working in python 3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-rw-r--r--scripts/lib/recipetool/create.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 744ff1b0ab..129742807f 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -24,7 +24,7 @@ import re
import json
import logging
import scriptutils
-import urlparse
+from urllib.parse import urlparse, urldefrag, urlsplit
import hashlib
logger = logging.getLogger('recipetool')
@@ -283,7 +283,7 @@ def determine_from_url(srcuri):
"""Determine name and version from a URL"""
pn = None
pv = None
- parseres = urlparse.urlparse(srcuri.lower().split(';', 1)[0])
+ parseres = urlparse(srcuri.lower().split(';', 1)[0])
if parseres.path:
if 'github.com' in parseres.netloc:
res = re.search(r'.*/(.*?)/archive/(.*)-final\.(tar|zip)', parseres.path)
@@ -355,7 +355,7 @@ def create_recipe(args):
srcrev = '${AUTOREV}'
if '://' in args.source:
# Fetch a URL
- fetchuri = reformat_git_uri(urlparse.urldefrag(args.source)[0])
+ fetchuri = reformat_git_uri(urldefrag(args.source)[0])
if args.binary:
# Assume the archive contains the directory structure verbatim
# so we need to extract to a subdirectory