python/samba: PY3 add compat function urllib_join to replace urllib.urljoin
authorNoel Power <noel.power@suse.com>
Wed, 19 Sep 2018 08:52:52 +0000 (10:52 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 26 Sep 2018 23:54:27 +0000 (01:54 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/compat.py

index 54f5bce3aa555557258ae42f106983a4ce88bf00..0c1869ad3b580ed8318bb78f7d2886cd95fad13a 100644 (file)
@@ -70,6 +70,7 @@ if PY3:
         return (x > y) - (x < y)
     # compat functions
     from urllib.parse import quote as urllib_quote
+    from urllib.parse import urljoin as urllib_join
     from urllib.request import urlopen as urllib_urlopen
     from functools import cmp_to_key as cmp_to_key_fn
 
@@ -146,6 +147,7 @@ else:
     # compat functions
     from urllib import quote as urllib_quote
     from urllib import urlopen as urllib_urlopen
+    from urlparse import urljoin as urllib_join
 
     # compat types
     integer_types = (int, long)