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):
|
def stopThread(self):
|
||||||
try:
|
try:
|
||||||
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
||||||
except: # noqa:E722
|
except queue.Full:
|
||||||
pass
|
self.logger.error('addressGeneratorQueue is Full')
|
||||||
super(FakeAddressGenerator, self).stopThread()
|
super(FakeAddressGenerator, self).stopThread()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
|
@ -147,7 +147,7 @@ class TestProcessProto(unittest.TestCase):
|
||||||
"ps", "-L", "-o", "comm=", "--pid",
|
"ps", "-L", "-o", "comm=", "--pid",
|
||||||
str(self.process.pid)
|
str(self.process.pid)
|
||||||
]).split()
|
]).split()
|
||||||
except: # noqa:E722
|
except subprocess.CalledProcessError:
|
||||||
thread_names = []
|
thread_names = []
|
||||||
|
|
||||||
running_threads = len(thread_names)
|
running_threads = len(thread_names)
|
||||||
|
|
Reference in New Issue
Block a user