From 9870844b38c84e7446b15909758497cecb26301e Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 20 Oct 2016 10:46:47 +1300 Subject: netlib.utils -> netlib.check Now only contains is_valid_[host,port] Intermediate step - this will be in mitproxy.net soon. --- netlib/http/url.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'netlib/http/url.py') diff --git a/netlib/http/url.py b/netlib/http/url.py index 67e22efa..3ca58120 100644 --- a/netlib/http/url.py +++ b/netlib/http/url.py @@ -2,7 +2,7 @@ import urllib from typing import Sequence from typing import Tuple -from netlib import utils +from netlib import check # PY2 workaround @@ -62,9 +62,9 @@ def parse(url): if not full_path.startswith(b"/"): full_path = b"/" + full_path - if not utils.is_valid_host(host): + if not check.is_valid_host(host): raise ValueError("Invalid Host") - if not utils.is_valid_port(port): + if not check.is_valid_port(port): raise ValueError("Invalid Port") return parsed.scheme, host, port, full_path -- cgit v1.2.3