aparo / pyes

Python connector for ElasticSearch - the pythonic way to use ElasticSearch
BSD 3-Clause "New" or "Revised" License
607 stars 270 forks source link

Fix for wrong error message when the connect string contains non-inte… #491

Closed ravipra closed 9 years ago

ravipra commented 9 years ago

…ger port

Described the issue in issue #490.

After fix, the trace back will be:

Traceback (most recent call last): File "test.py", line 4, in es = ES(conn_str) File "/home/ravi/tmp/pyes/es.py", line 283, in init self._check_servers() File "/home/ravi/tmp/pyes/es.py", line 339, in _check_servers raise RuntimeError("Invalid port: \"%s\"" % tokens[1]) RuntimeError: Invalid port: "abcd"