Skip to content

Commit

Permalink
fixing deepsource
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Oct 23, 2020
1 parent a5bf04f commit d841f3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userge/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

__all__ = ['Userge']

import os
import time
import signal
import asyncio
Expand Down Expand Up @@ -186,7 +185,8 @@ async def _shutdown(sig: signal.Signals) -> None:
await _finalize()

for sig in (signal.SIGHUP, signal.SIGTERM, signal.SIGINT):
self.loop.add_signal_handler(sig, lambda: self.loop.create_task(_shutdown(sig)))
self.loop.add_signal_handler(
sig, lambda sig=sig: self.loop.create_task(_shutdown(sig)))
self.loop.run_until_complete(self.start())
for task in self._tasks:
running_tasks.append(self.loop.create_task(task()))
Expand Down

0 comments on commit d841f3e

Please sign in to comment.