This commit is contained in:
Miroslav Stampar 2015-08-23 21:09:20 +02:00
parent fef8f20565
commit 1204141278

View File

@ -3470,8 +3470,13 @@ def asciifyUrl(url, forceQuote=False):
netloc = ':' + password + netloc
netloc = username + netloc
if parts.port:
netloc += ':' + str(parts.port)
try:
port = parts.port
except:
port = None
if port:
netloc += ':' + str(port)
return urlparse.urlunsplit([parts.scheme, netloc, path, query, parts.fragment])