Skip to content

Commit

Permalink
Merge pull request #16 from hdoublearp/master
Browse files Browse the repository at this point in the history
fix: fix bug in signal handler on Windows
  • Loading branch information
en9inerd authored Oct 8, 2024
2 parents 92f5c02 + d0263ea commit 446e627
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tgeraser/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ async def main() -> None:
"""
Entry function
"""
loop = asyncio.get_running_loop()
loop.add_signal_handler(signal.SIGINT, signal_handler)
try:
loop = asyncio.get_running_loop()
loop.add_signal_handler(signal.SIGINT, signal_handler)
except NotImplementedError:
pass

arguments = docopt(__doc__, version=VERSION)
limit = cast_to_int(arguments["--limit"], "limit") if arguments["--limit"] else None
Expand Down

0 comments on commit 446e627

Please sign in to comment.