Convert URL from bytes to str for RemoteAccess
authorYonggang Luo <luoyonggang@gmail.com>
Wed, 24 Oct 2012 01:50:47 +0000 (09:50 +0800)
committerJelmer Vernooij <jelmer@jelmer.uk>
Thu, 7 Jul 2016 10:58:27 +0000 (10:58 +0000)
subvertpy/ra.py

index a73b71340e909113b685f17429d0217f1da5804c..89a9d100d4c1c9ef06341f9bbfc287fc5b8060cc 100644 (file)
@@ -41,6 +41,8 @@ def RemoteAccess(url, *args, **kwargs):
     :param url: URL to connect to
     :return: RemoteAccess object
     """
+    if isinstance(url, bytes):
+        url = url.decode("utf-8")
     (type, opaque) = urllib.splittype(url)
     if not type in url_handlers:
         raise SubversionException("Unknown URL type '%s'" % type, ERR_BAD_URL)