Permalink
Browse files

Issue 85. Fix IndexMissingException.

Alleviate problems from a bug in pyes 0.15.
  • Loading branch information...
1 parent 7dcc034 commit 1578b373d16de3c7a0de490fd39ad6d38aefcdb1 Will Kahn-Greene committed Oct 17, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 elasticutils/tests/__init__.py
@@ -69,7 +69,12 @@ def get_s(cls, mapping_type=None):
@classmethod
def create_index(cls):
es = cls.get_es()
- es.delete_index_if_exists(cls.index_name)
+ try:
+ es.delete_index_if_exists(cls.index_name)
+ except pyes.exceptions.IndexMissingException:
+ # pyes 0.15 throws an IndexMissingException despite the
+ # fact that the method should allow for that.
+ pass
es.create_index(cls.index_name)
@classmethod

0 comments on commit 1578b37

Please sign in to comment.