From eb2367255dd1292d088e3b63a7e39c43555da299 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Thu, 21 Sep 2017 19:56:17 +0200 Subject: [PATCH] Fix channel support url parsing --- gitlab/channel_support.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gitlab/channel_support.py b/gitlab/channel_support.py index e69ec21..7dac6d3 100644 --- a/gitlab/channel_support.py +++ b/gitlab/channel_support.py @@ -1,9 +1,18 @@ #!/usr/bin/env python import re + +from future.standard_library import install_aliases +install_aliases() + +from urllib.parse import urlparse from conda.exports import get_index +def _remove_address(url): + return urlparse(url).path + + def main(channel_url, name, version, py_ver, get_urls=False): # no dot in py_ver py_ver = py_ver.replace('.', '') @@ -18,7 +27,7 @@ def main(channel_url, name, version, py_ver, get_urls=False): if match and match.group() == 'py{}'.format(py_ver): build_number = max(build_number, dist.build_number + 1) urls.append(index[dist].url) - urls = [url.replace(channel_url, '') for url in urls] + urls = [_remove_address(url) for url in urls] return build_number, urls -- GitLab