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:
|
||||
logger.error("Missing mandatory key %s", e)
|
||||
return None
|
||||
except:
|
||||
except: # noqa:E722
|
||||
logger.error("classBase fail", exc_info=True)
|
||||
return None
|
||||
else:
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Reference in New Issue
Block a user