Skip to content

Commit

Permalink
Add a default URL if none is specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrose committed Feb 12, 2015
1 parent a50b18e commit 768322e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyelasticsearch/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ElasticSearch(object):
This object is thread-safe. You can create one instance and share it
among all threads.
"""
def __init__(self, urls, timeout=60, max_retries=0):
def __init__(self, urls='http://localhost:9200', timeout=60, max_retries=0):
"""
:arg urls: A URL or iterable of URLs of ES nodes. These are full URLs
with port numbers, like ``http://elasticsearch.example.com:9200``.
Expand Down
2 changes: 1 addition & 1 deletion pyelasticsearch/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ElasticSearchTestCase(unittest.TestCase):
def setUp(self):
self.conn = ElasticSearch('http://localhost:9200/')
self.conn = ElasticSearch()

def tearDown(self):
try:
Expand Down

0 comments on commit 768322e

Please sign in to comment.