tests/fake_server.py: use "except Exception" instead of bare except clauses.

This commit is contained in:
joo committed 2018-01-06 19:24:22 +00:00
1 parent 3fb922b0d1
commit 53312f997b
1 file changed
+2 -2
+2 -2
View File
@@ -431,7 +431,7 @@ class _FakeServerTest(unittest.TestCase):
if thread is not None and thread.is_alive(): if thread is not None and thread.is_alive():
errors.append({ errors.append({
'msg': 'Thread "%s" timed out.' % thread.name}) 'msg': 'Thread "%s" timed out.' % thread.name})
except: except Exception:
errors.insert(0, { errors.insert(0, {
'msg': 'Exception in main thread', 'msg': 'Exception in main thread',
'exc_info': sys.exc_info()}) 'exc_info': sys.exc_info()})
@@ -465,7 +465,7 @@ class _FakeServerTest(unittest.TestCase):
exc_info = None exc_info = None
try: try:
server.run() server.run()
except: except Exception:
exc_info = sys.exc_info() exc_info = sys.exc_info()
with server_lock: with server_lock:
server_exc_info[0] = exc_info server_exc_info[0] = exc_info