Skip to content

Commit 4bbeef6

Browse files
barneygalezooba
andauthored
Update Lib/urllib/request.py
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
1 parent 873c19a commit 4bbeef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/urllib/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ def _is_local_authority(authority, resolve):
14981498
return False
14991499
try:
15001500
address = socket.gethostbyname(authority)
1501-
except (socket.gaierror, AttributeError):
1501+
except (socket.gaierror, AttributeError, UnicodeEncodeError):
15021502
return False
15031503
return address in FileHandler().get_names()
15041504

0 commit comments

Comments
 (0)