Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
Expose version in elasticutils.__version__
Browse files Browse the repository at this point in the history
This also renames elasticutils.VERSION to elasticutils.PYES_VERSION
to avoid convusion.
  • Loading branch information
willkg committed Aug 24, 2012
1 parent 51a2248 commit 92f35dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ None.
you to do a negative query which reduces scores for documents that
match.

* The elasticutils version is in ``elasticutils.__version__`` now.


Version 0.4: Released July 31st, 2012
=====================================
Expand Down
7 changes: 5 additions & 2 deletions elasticutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from itertools import izip
from operator import itemgetter

from pyes import ES, VERSION
from pyes import ES
from pyes import VERSION as PYES_VERSION

from elasticutils._version import __version__


log = logging.getLogger('elasticutils')
Expand Down Expand Up @@ -67,7 +70,7 @@ def get_es(hosts=None, default_indexes=None, timeout=None, dump_curl=None,
# is set it manually after the ES has been created and
# defaults['dump_curl'] is truthy. This might not work for all
# values of dump_curl.
if VERSION[0:2] == (0, 15) and dump_curl is not None:
if PYES_VERSION[0:2] == (0, 15) and dump_curl is not None:
es.dump_curl = dump_curl

return es
Expand Down

0 comments on commit 92f35dc

Please sign in to comment.