From 35416a19241009704c781ff02cbaabca4269c267 Mon Sep 17 00:00:00 2001 From: 4shen0ne <33086594+zrquan@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:50:51 +0800 Subject: [PATCH 1/2] suppress CancelledError --- lib/controller/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index b0fbf0b98..35e4380b4 100755 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -277,7 +277,7 @@ def start(self) -> None: self.fuzzer.start() self.process() - except KeyboardInterrupt: + except (KeyboardInterrupt, asyncio.CancelledError): pass finally: From 8da29c4113f1d44f18e6de6159eeeb13d9193e07 Mon Sep 17 00:00:00 2001 From: 4shen0ne <4shen.01@gmail.com> Date: Fri, 18 Oct 2024 10:21:41 +0800 Subject: [PATCH 2/2] lint --- lib/controller/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 35e4380b4..8a2b94783 100755 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -330,7 +330,7 @@ def set_target(self, url: str) -> None: if not port: port = STANDARD_PORTS.get(parsed.scheme, None) elif not 0 < port < 65536: - raise InvalidURLException(f"Invalid port number: {port}") + raise InvalidURLException(f"Invalid port number: {port}") if options["ip"]: cache_dns(parsed.hostname, port, options["ip"])