Remove useless re-raise of cancellation
This commit is contained in:
parent
db187540d5
commit
d85034353f
@ -42,12 +42,8 @@ def main_loop():
|
|||||||
loop.add_signal_handler(getattr(signal, signame),
|
loop.add_signal_handler(getattr(signal, signame),
|
||||||
partial(on_signal, signame))
|
partial(on_signal, signame))
|
||||||
|
|
||||||
try:
|
loop.run_until_complete(future)
|
||||||
loop.run_until_complete(future)
|
loop.close()
|
||||||
except asyncio.CancelledError:
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
loop.close()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@ -388,7 +388,6 @@ class BlockProcessor(server.db.DB):
|
|||||||
self.on_cancel()
|
self.on_cancel()
|
||||||
# This lets the asyncio subsystem process futures cancellations
|
# This lets the asyncio subsystem process futures cancellations
|
||||||
await asyncio.sleep(0)
|
await asyncio.sleep(0)
|
||||||
raise
|
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
'''Called when the main loop is cancelled.
|
'''Called when the main loop is cancelled.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user