summaryrefslogtreecommitdiff
path: root/Lib/urllib/parse.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-12-21 14:17:12 -0600
committerZachary Ware <zachary.ware@gmail.com>2015-12-21 14:17:12 -0600
commitf2b234443c53cb73dc749da57d952286437cb15a (patch)
treef21b8b25f5bfbe76a2c85ae62f6d06060dd03372 /Lib/urllib/parse.py
parent26b842a82d9ae7d30c692080bf352a0ef78a626c (diff)
parent977fd6d7c6593680fd5ffdebb262a2a3f2f24387 (diff)
downloadcpython-f2b234443c53cb73dc749da57d952286437cb15a.tar.gz
Issue #25827: Merge with 3.5
Diffstat (limited to 'Lib/urllib/parse.py')
-rw-r--r--Lib/urllib/parse.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index 01c9e587fb..5e2155ccaf 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -156,9 +156,8 @@ class _NetlocResultMixinBase(object):
port = self._hostinfo[1]
if port is not None:
port = int(port, 10)
- # Return None on an illegal port
if not ( 0 <= port <= 65535):
- return None
+ raise ValueError("Port out of range 0-65535")
return port