Skip to content

Commit f333f9f

Browse files
committed
CI: Fix flake8 errors added due to flake8 updates
1 parent 99ea39d commit f333f9f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

aiotools/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ async def __aexit__(self, exc_type, exc_value, tb):
120120
return False
121121
# If this is a purely new exception, raise the new one.
122122
raise
123-
except:
123+
except Exception:
124124
# If the finalization part of the generator throws a new
125125
# exception, re-raise it.
126126
if sys.exc_info()[1] is exc_value:

aiotools/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def _work():
5151
try:
5252
task = _work()
5353
loop.run_until_complete(task.__anext__())
54-
except:
54+
except Exception:
5555
log.exception("Unexpected error during worker initialization!")
5656
# interrupt the main loop.
5757
os.killpg(os.getpgid(0), signal.SIGINT)

tests/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ async def simple_ctx(msg):
283283
try:
284284
await asyncio.sleep(0)
285285
yield msg
286-
except:
286+
except Exception:
287287
await asyncio.sleep(0)
288288
# exception is replaced
289289
raise ValueError('bomb2')

0 commit comments

Comments
 (0)