From 0fa43f208bef9f6a25e20a13b84083df6cb57b9f Mon Sep 17 00:00:00 2001 From: Ian Hoang Date: Mon, 30 Sep 2024 14:12:50 -0500 Subject: [PATCH] Fix pylint Signed-off-by: Ian Hoang --- osbenchmark/workload_generator/extractors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osbenchmark/workload_generator/extractors.py b/osbenchmark/workload_generator/extractors.py index 98a68301..fa63ccf6 100644 --- a/osbenchmark/workload_generator/extractors.py +++ b/osbenchmark/workload_generator/extractors.py @@ -42,7 +42,7 @@ def extract_indices(self, workload_path): try: for index in self.custom_workload.indices: extracted_indices += self.extract(workload_path, index.name) - except opensearchpy.exceptions.NotFoundError as e: + except opensearchpy.exceptions.NotFoundError: raise exceptions.SystemSetupError(f"Index [{index.name}] does not exist.") except opensearchpy.OpenSearchException: self.logger.error("Failed at extracting index [%s]", index) @@ -177,7 +177,7 @@ def extract_documents(self, index, documents_limit=None): total_documents = self.client.count(index=index)["count"] - logger.info("total documents: %s, documents limit: %s", total_documents, documents_limit) + logger.info("Total documents in index: %s, number of docs user requested: %s", total_documents, documents_limit) documents_to_extract = total_documents if not documents_limit else min(total_documents, documents_limit) @@ -185,7 +185,7 @@ def extract_documents(self, index, documents_limit=None): # Only time when documents-1k.json will be less than 1K documents is # when the documents_limit is < 1k documents or source index has less than 1k documents if documents_limit < self.DEFAULT_TEST_MODE_DOC_COUNT: - test_mode_warning_msg = f"Due to --number-of-docs set by user, " + \ + test_mode_warning_msg = "Due to --number-of-docs set by user, " + \ f"test-mode docs will be less than the default {self.DEFAULT_TEST_MODE_DOC_COUNT} documents." console.warn(test_mode_warning_msg)