Commit f7e26736 authored by Andrey Veltischev's avatar Andrey Veltischev
Browse files

Merge branch 'andrey/exceptions_handling' into 'master'

Remove return_exceptions kwarg from gather for proper handling coroutine errors

See merge request !13
parents f222133a db5557d2
......@@ -97,11 +97,7 @@ class ApplicationWrapper:
self.handle_signal(signal.SIGHUP, _raise_graceful_exit)
try:'Start serving')
exceptions = self.loop.run_until_complete(
asyncio.gather(*[app.initialize() for app in self.apps], return_exceptions=True)
for exception in filter(lambda ex: isinstance(ex, Exception), exceptions):
LOG.error('Unexpected exception', exc_info=exception)
self.loop.run_until_complete(asyncio.gather(*[app.initialize() for app in self.apps]))
except KeyboardInterrupt:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment