Added ignore comments for bare except warnings

This commit is contained in:
kuldeep.k@cisinlabs.com 2021-09-30 16:19:42 +05:30
parent b5579cf857
commit ec52d2dae6
No known key found for this signature in database
GPG Key ID: AF4FB299BF7C7C2A
6 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ def constructObject(data):
except KeyError as e:
logger.error("Missing mandatory key %s", e)
return None
except:
except: # noqa:E722
logger.error("classBase fail", exc_info=True)
return None
else:

View File

@ -66,7 +66,7 @@ class FakeAddressGenerator(StoppableThread):
def stopThread(self):
try:
queues.addressGeneratorQueue.put(("stopThread", "data"))
except:
except: # noqa:E722
pass
super(FakeAddressGenerator, self).stopThread()

View File

@ -51,6 +51,6 @@ class ReceiveQueueThread(StoppableThread):
connection.set_state("close", 0)
else:
self.logger.error('Socket error: %s', err)
except:
except: # noqa:E722
self.logger.error('Error processing', exc_info=True)
receiveDataQueue.task_done()

View File

@ -18,7 +18,7 @@ class IndicatorLibmessaging(object):
self.app = MessagingMenu.App(desktop_id='pybitmessage.desktop')
self.app.register()
self.app.connect('activate-source', self.activate)
except:
except: # noqa:E722
self.app = None
return

View File

@ -117,7 +117,7 @@ class TestCore(unittest.TestCase):
while asyncore.socket_map:
print("loop, state = %s" % direct.state)
asyncore.loop(timeout=10, count=1)
except:
except: # noqa:E722
self.fail('Exception in test loop')
def _load_knownnodes(self, filepath):

View File

@ -147,7 +147,7 @@ class TestProcessProto(unittest.TestCase):
"ps", "-L", "-o", "comm=", "--pid",
str(self.process.pid)
]).split()
except: # pylint: disable=bare-except
except: # noqa:E722
thread_names = []
running_threads = len(thread_names)