mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Issue13104 - Fix urllib.request.thishost() utility function.
This commit is contained in:
parent
ad87fa6719
commit
1b7da519b0
2 changed files with 5 additions and 1 deletions
|
@ -2116,7 +2116,7 @@ def thishost():
|
|||
"""Return the IP addresses of the current host."""
|
||||
global _thishost
|
||||
if _thishost is None:
|
||||
_thishost = tuple(socket.gethostbyname_ex(socket.gethostname()[2]))
|
||||
_thishost = tuple(socket.gethostbyname_ex(socket.gethostname())[2])
|
||||
return _thishost
|
||||
|
||||
_ftperrors = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue