summaryrefslogtreecommitdiff
path: root/Lib/urlparse.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-10-14 19:59:54 +0000
committerGuido van Rossum <guido@python.org>2002-10-14 19:59:54 +0000
commit502b6e84fb9ba40d90bc512c17706b0a65dac421 (patch)
tree0ec6aa00fc07e354a81e04e0c612c02bc56ee927 /Lib/urlparse.py
parente276372b1d6e9a6cd9cbcb9e893a3cd4e5cc1e74 (diff)
downloadcpython-502b6e84fb9ba40d90bc512c17706b0a65dac421.tar.gz
Fix for 1.33: urlsplit() should only add '//' if scheme != ''.
Will add test and backport.
Diffstat (limited to 'Lib/urlparse.py')
-rw-r--r--Lib/urlparse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 6361937a93..777b42f703 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -128,7 +128,7 @@ def urlunparse((scheme, netloc, url, params, query, fragment)):
return urlunsplit((scheme, netloc, url, query, fragment))
def urlunsplit((scheme, netloc, url, query, fragment)):
- if netloc or (scheme in uses_netloc and url[:2] != '//'):
+ if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'):
if url and url[:1] != '/': url = '/' + url
url = '//' + (netloc or '') + url
if scheme: