Added ignore comments for bare except warnings
This commit is contained in:
parent
b5579cf857
commit
ec52d2dae6
|
@ -31,7 +31,7 @@ def constructObject(data):
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
logger.error("Missing mandatory key %s", e)
|
logger.error("Missing mandatory key %s", e)
|
||||||
return None
|
return None
|
||||||
except:
|
except: # noqa:E722
|
||||||
logger.error("classBase fail", exc_info=True)
|
logger.error("classBase fail", exc_info=True)
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -66,7 +66,7 @@ class FakeAddressGenerator(StoppableThread):
|
||||||
def stopThread(self):
|
def stopThread(self):
|
||||||
try:
|
try:
|
||||||
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
||||||
except:
|
except: # noqa:E722
|
||||||
pass
|
pass
|
||||||
super(FakeAddressGenerator, self).stopThread()
|
super(FakeAddressGenerator, self).stopThread()
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,6 @@ class ReceiveQueueThread(StoppableThread):
|
||||||
connection.set_state("close", 0)
|
connection.set_state("close", 0)
|
||||||
else:
|
else:
|
||||||
self.logger.error('Socket error: %s', err)
|
self.logger.error('Socket error: %s', err)
|
||||||
except:
|
except: # noqa:E722
|
||||||
self.logger.error('Error processing', exc_info=True)
|
self.logger.error('Error processing', exc_info=True)
|
||||||
receiveDataQueue.task_done()
|
receiveDataQueue.task_done()
|
||||||
|
|
|
@ -18,7 +18,7 @@ class IndicatorLibmessaging(object):
|
||||||
self.app = MessagingMenu.App(desktop_id='pybitmessage.desktop')
|
self.app = MessagingMenu.App(desktop_id='pybitmessage.desktop')
|
||||||
self.app.register()
|
self.app.register()
|
||||||
self.app.connect('activate-source', self.activate)
|
self.app.connect('activate-source', self.activate)
|
||||||
except:
|
except: # noqa:E722
|
||||||
self.app = None
|
self.app = None
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class TestCore(unittest.TestCase):
|
||||||
while asyncore.socket_map:
|
while asyncore.socket_map:
|
||||||
print("loop, state = %s" % direct.state)
|
print("loop, state = %s" % direct.state)
|
||||||
asyncore.loop(timeout=10, count=1)
|
asyncore.loop(timeout=10, count=1)
|
||||||
except:
|
except: # noqa:E722
|
||||||
self.fail('Exception in test loop')
|
self.fail('Exception in test loop')
|
||||||
|
|
||||||
def _load_knownnodes(self, filepath):
|
def _load_knownnodes(self, filepath):
|
||||||
|
|
|
@ -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: # pylint: disable=bare-except
|
except: # noqa:E722
|
||||||
thread_names = []
|
thread_names = []
|
||||||
|
|
||||||
running_threads = len(thread_names)
|
running_threads = len(thread_names)
|
||||||
|
|
Reference in New Issue
Block a user