From 36eb5eb78137a0128657c684ce6a76b427a24cb5 Mon Sep 17 00:00:00 2001 From: Harris Tzovanakis Date: Tue, 19 Dec 2023 07:52:38 +0000 Subject: [PATCH] fix: change exception message in commands * closes: #8 --- django_opensearch_dsl/management/commands/opensearch.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django_opensearch_dsl/management/commands/opensearch.py b/django_opensearch_dsl/management/commands/opensearch.py index 03e8532..c81a6f9 100644 --- a/django_opensearch_dsl/management/commands/opensearch.py +++ b/django_opensearch_dsl/management/commands/opensearch.py @@ -126,9 +126,7 @@ def _manage_index(self, action, indices, force, verbosity, ignore_error, **optio exit(1) except opensearchpy.exceptions.RequestError: if verbosity or not ignore_error: - self.stderr.write( - f"{pp} index '{index._name}'... {self.style.ERROR('Error (already exists)')}" - ) # noqa + self.stderr.write(f"{pp} index '{index._name}'... {self.style.ERROR('Error')}") # noqa if not ignore_error: self.stderr.write("exiting...") exit(1)