From 1b7da519b09d8885272d323af982d36675419075 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Thu, 6 Oct 2011 00:32:02 +0800 Subject: Issue13104 - Fix urllib.request.thishost() utility function. --- Lib/urllib/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/urllib/request.py') diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 773025a09b3..d3b5c29cbb7 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 -- cgit v1.2.3