Updated queue.Full logger.error to logger.warning and added bare except for subprocess.check_output function call for windows

This commit is contained in:
kuldeep.k@cisinlabs.com 2021-10-04 18:21:55 +05:30
parent 0d6992dc8a
commit e8b80f6117
No known key found for this signature in database
GPG Key ID: AF4FB299BF7C7C2A
2 changed files with 3 additions and 1 deletions

View File

@ -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):

View File

@ -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