diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-10-06 00:32:52 +0800 |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-10-06 00:32:52 +0800 |
commit | 55a190fbbddea150498a06351c66170c0a4a51bf (patch) | |
tree | c9c28f9440f3da6361193769a078801042e89622 /Lib/urllib/request.py | |
parent | 91a076a72f22e0c7ad997d46be76f7021a27ba6a (diff) | |
parent | 1b7da519b09d8885272d323af982d36675419075 (diff) | |
download | cpython-git-55a190fbbddea150498a06351c66170c0a4a51bf.tar.gz |
merge from 3.2. Issue13104 - Fix urllib.request.thishost() utility function.
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r-- | Lib/urllib/request.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 4a571e8b9f..671ab6894b 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -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 |