aboutsummaryrefslogtreecommitdiff
path: root/examples/network/http_client_ssl.py
diff options
context:
space:
mode:
authorPaul Sokolovsky2016-05-03 00:45:37 +0300
committerPaul Sokolovsky2016-05-03 00:45:37 +0300
commitc2d885501ff08f017634412b159b03ed923e119f (patch)
treec4ef2af21cd9139e0c12e6f8a388b4969429c2ff /examples/network/http_client_ssl.py
parent3944d3511f8a46f4d61201f6e376635abbeee72e (diff)
examples/network/: Use getaddrinfo() result in easy way.
Instead of extracting 4th element, extact last. Much easier to remember!
Diffstat (limited to 'examples/network/http_client_ssl.py')
-rw-r--r--examples/network/http_client_ssl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/http_client_ssl.py b/examples/network/http_client_ssl.py
index 5d4d8fd1b..53b1c732b 100644
--- a/examples/network/http_client_ssl.py
+++ b/examples/network/http_client_ssl.py
@@ -13,7 +13,7 @@ def main(use_stream=True):
ai = _socket.getaddrinfo("google.com", 443)
print("Address infos:", ai)
- addr = ai[0][4]
+ addr = ai[0][-1]
print("Connect address:", addr)
s.connect(addr)