Python3 Migrate
This commit is contained in:
14
venv/lib/python3.7/site-packages/uritools/join.py
Normal file
14
venv/lib/python3.7/site-packages/uritools/join.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from .split import urisplit
|
||||
|
||||
|
||||
def urijoin(base, ref, strict=False):
|
||||
"""Convert a URI reference relative to a base URI to its target URI
|
||||
string.
|
||||
|
||||
"""
|
||||
if isinstance(base, type(ref)):
|
||||
return urisplit(base).transform(ref, strict).geturi()
|
||||
elif isinstance(base, bytes):
|
||||
return urisplit(base.decode()).transform(ref, strict).geturi()
|
||||
else:
|
||||
return urisplit(base).transform(ref.decode(), strict).geturi()
|
||||
Reference in New Issue
Block a user