Updated specific exceptions instead of bare except ignore comments
This commit is contained in:
parent
ec52d2dae6
commit
84c545ad8e
|
@ -66,8 +66,8 @@ class FakeAddressGenerator(StoppableThread):
|
|||
def stopThread(self):
|
||||
try:
|
||||
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
||||
except: # noqa:E722
|
||||
pass
|
||||
except queue.Full:
|
||||
self.logger.error('addressGeneratorQueue is Full')
|
||||
super(FakeAddressGenerator, self).stopThread()
|
||||
|
||||
def run(self):
|
||||
|
|
|
@ -147,7 +147,7 @@ class TestProcessProto(unittest.TestCase):
|
|||
"ps", "-L", "-o", "comm=", "--pid",
|
||||
str(self.process.pid)
|
||||
]).split()
|
||||
except: # noqa:E722
|
||||
except subprocess.CalledProcessError:
|
||||
thread_names = []
|
||||
|
||||
running_threads = len(thread_names)
|
||||
|
|
Reference in New Issue
Block a user