diff --git a/elasticsearch/transport.py b/elasticsearch/transport.py index 9f553200..79a886e1 100644 --- a/elasticsearch/transport.py +++ b/elasticsearch/transport.py @@ -8,8 +8,8 @@ from .serializer import JSONSerializer, Deserializer, DEFAULT_SERIALIZERS from .exceptions import ConnectionError, TransportError, SerializationError, \ ConnectionTimeout, ImproperlyConfigured -# get ip/port from "inet[wind/127.0.0.1:9200]" -ADDRESS_RE = re.compile(r'/(?P[\.:0-9a-f]*):(?P[0-9]+)\]?$') +# get ip/port from "127.0.0.1:9200" +ADDRESS_RE = re.compile(r'^(?P[\.:0-9a-f]*):(?P[0-9]+)?$') def get_host_info(node_info, host): diff --git a/test_elasticsearch/test_transport.py b/test_elasticsearch/test_transport.py index c6d4bd36..64c56e03 100644 --- a/test_elasticsearch/test_transport.py +++ b/test_elasticsearch/test_transport.py @@ -29,11 +29,11 @@ CLUSTER_NODES = '''{ "nodes" : { "wE_6OGBNSjGksbONNncIbg" : { "name" : "Nightwind", - "transport_address" : "inet[/127.0.0.1:9300]", + "transport_address" : "127.0.0.1:9300", "hostname" : "wind", "version" : "0.20.4", - "http_address" : "inet[/1.1.1.1:123]", - "thrift_address" : "/1.1.1.1:9500]" + "http_address" : "1.1.1.1:123", + "thrift_address" : "1.1.1.1:9500" } } }'''