mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
merge from 3.2. Issue13104 - Fix urllib.request.thishost() utility function.
This commit is contained in:
commit
55a190fbbd
2 changed files with 5 additions and 1 deletions
|
|
@ -2125,7 +2125,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