Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
remove graceful exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Dec 4, 2023
1 parent e4f1a96 commit f8701a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.0.5"
__version__ = "5.0.6"
13 changes: 1 addition & 12 deletions cyberdrop_dl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,13 @@ async def director(manager: Manager) -> None:
asyncio.get_event_loop().stop()


class GracefulExit:
def __enter__(self):
signal.signal(signal.SIGINT, self.exit_gracefully)
return self

@staticmethod
def exit_gracefully(signum, frame):
exit(0)


def main():
manager = startup()

with contextlib.suppress(RuntimeError, asyncio.CancelledError):
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
with GracefulExit():
aiorun.run(director(manager), stop_on_unhandled_errors=True)
aiorun.run(director(manager), stop_on_unhandled_errors=True)
sys.exit(0)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
version = "5.0.5"
version = "5.0.6"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit f8701a9

Please sign in to comment.