mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 04:44:42 +00:00
Use urlparse.uses_relative instead of unofficial urlparse.non_hierarchical (which has been removed in the current CPython 2.7.x trunk).
This commit is contained in:
parent
b0e5c7fc59
commit
1c739aed81
1 changed files with 1 additions and 2 deletions
|
|
@ -309,8 +309,7 @@ def url_norm (url, encoding=None):
|
|||
is_idn = url_fix_host(urlparts)
|
||||
# query
|
||||
urlparts[3] = url_parse_query(urlparts[3], encoding=encoding)
|
||||
is_hierarchical = urlparts[0] not in urlparse.non_hierarchical
|
||||
if is_hierarchical:
|
||||
if urlparts[0] in urlparse.uses_relative:
|
||||
# URL has a hierarchical path we should norm
|
||||
if not urlparts[2]:
|
||||
# Empty path is allowed if both query and fragment are also empty.
|
||||
|
|
|
|||
Loading…
Reference in a new issue