Do not register signals in non posix OS

This commit is contained in:
arabcoders 2025-08-01 18:07:28 +03:00
parent 92a6101bbe
commit bac1a51a4a

View file

@ -280,7 +280,9 @@ class Download:
self.started_time = int(time.time()) self.started_time = int(time.time())
def mark_cancelled(*_): if "posix" == os.name:
def mark_cancelled(*_) -> None:
cls._interrupted = True cls._interrupted = True
cls.to_screen("[info] Interrupt received, exiting cleanly...") cls.to_screen("[info] Interrupt received, exiting cleanly...")
raise SystemExit(130) # noqa: TRY301 raise SystemExit(130) # noqa: TRY301