From f9459a0d3717537a9b520a213c706927b34ed515 Mon Sep 17 00:00:00 2001 From: Yotam Tanay Date: Sun, 18 Dec 2016 20:18:12 +0200 Subject: [PATCH 1/2] Fix error where address is null in _get_host_info --- elasticsearch/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/transport.py b/elasticsearch/transport.py index fa494fb76..d0260671f 100644 --- a/elasticsearch/transport.py +++ b/elasticsearch/transport.py @@ -220,7 +220,7 @@ def _get_host_info(self, host_info): address = host_info.get('http', {}).get('publish_address') # malformed address - if ':' not in address: + if not address or ':' not in address: return None host['host'], host['port'] = address.rsplit(':', 1) From a7fab5b1fb0d06b34244f4910137487b7c77e75a Mon Sep 17 00:00:00 2001 From: Yotam Tanay Date: Sun, 18 Dec 2016 20:25:54 +0200 Subject: [PATCH 2/2] Bump CI --- elasticsearch/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/transport.py b/elasticsearch/transport.py index d0260671f..70715f27e 100644 --- a/elasticsearch/transport.py +++ b/elasticsearch/transport.py @@ -219,7 +219,7 @@ def _get_host_info(self, host_info): host = {} address = host_info.get('http', {}).get('publish_address') - # malformed address + # malformed or no address given if not address or ':' not in address: return None