summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-10-05 16:32:02 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-10-05 16:32:02 (GMT)
commit1b7da519b09d8885272d323af982d36675419075 (patch)
tree04b642a7c9dcd000d51a7e906f3b5de0aeafd620 /Lib/urllib
parentad87fa671939609f9ff7c0d489f09a8c86586fbd (diff)
downloadcpython-1b7da519b09d8885272d323af982d36675419075.zip
cpython-1b7da519b09d8885272d323af982d36675419075.tar.gz
cpython-1b7da519b09d8885272d323af982d36675419075.tar.bz2
Issue13104 - Fix urllib.request.thishost() utility function.
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 773025a..d3b5c29 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -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