From e8b80f61172f7ba2b173ab4abb499ae972b12fa5 Mon Sep 17 00:00:00 2001 From: "kuldeep.k@cisinlabs.com" Date: Mon, 4 Oct 2021 18:21:55 +0530 Subject: [PATCH] Updated queue.Full logger.error to logger.warning and added bare except for subprocess.check_output function call for windows --- src/mock/class_addressGenerator.py | 2 +- src/tests/test_process.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mock/class_addressGenerator.py b/src/mock/class_addressGenerator.py index 7934a187..fbb34710 100644 --- a/src/mock/class_addressGenerator.py +++ b/src/mock/class_addressGenerator.py @@ -69,7 +69,7 @@ class FakeAddressGenerator(StoppableThread): try: queues.addressGeneratorQueue.put(("stopThread", "data")) except queue.Full: - self.logger.error('addressGeneratorQueue is Full') + self.logger.warning('addressGeneratorQueue is Full') super(FakeAddressGenerator, self).stopThread() def run(self): diff --git a/src/tests/test_process.py b/src/tests/test_process.py index 5cc9e07b..c968c0ae 100644 --- a/src/tests/test_process.py +++ b/src/tests/test_process.py @@ -149,6 +149,8 @@ class TestProcessProto(unittest.TestCase): ]).split() except subprocess.CalledProcessError: thread_names = [] + except: # noqa:E722 + thread_names = [] running_threads = len(thread_names) if 0 < running_threads < 30: # adequacy check