Skip to content

Commit 1b60d9b

Browse files
committed
iElasticsearch 2.0 exposes just host:port in nodes.info
Fixes elastic#293
1 parent 5e97002 commit 1b60d9b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

elasticsearch/transport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from .exceptions import ConnectionError, TransportError, SerializationError, \
99
ConnectionTimeout, ImproperlyConfigured
1010

11-
# get ip/port from "inet[wind/127.0.0.1:9200]"
12-
ADDRESS_RE = re.compile(r'/(?P<host>[\.:0-9a-f]*):(?P<port>[0-9]+)\]?$')
11+
# get ip/port from "127.0.0.1:9200"
12+
ADDRESS_RE = re.compile(r'^(?P<host>[\.:0-9a-f]*):(?P<port>[0-9]+)?$')
1313

1414

1515
def get_host_info(node_info, host):

test_elasticsearch/test_transport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ def perform_request(self, *args, **kwargs):
2929
"nodes" : {
3030
"wE_6OGBNSjGksbONNncIbg" : {
3131
"name" : "Nightwind",
32-
"transport_address" : "inet[/127.0.0.1:9300]",
32+
"transport_address" : "127.0.0.1:9300",
3333
"hostname" : "wind",
3434
"version" : "0.20.4",
35-
"http_address" : "inet[/1.1.1.1:123]",
36-
"thrift_address" : "/1.1.1.1:9500]"
35+
"http_address" : "1.1.1.1:123",
36+
"thrift_address" : "1.1.1.1:9500"
3737
}
3838
}
3939
}'''

0 commit comments

Comments
 (0)