Skip to content

Commit d8a84b6

Browse files
committed
Just ignore 404 instead of catching exception
1 parent 8a18ef6 commit d8a84b6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test_elasticsearch/test_server/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ def setUp(self):
5454

5555
def tearDown(self):
5656
self.client.indices.delete('*')
57-
try:
58-
self.client.indices.delete_template('*')
59-
except NotFoundError:
60-
pass
57+
self.client.indices.delete_template('*', ignore=404)
6158

6259
@property
6360
def es_version(self):

0 commit comments

Comments
 (0)