From 4c5f9926707c2df430855dc356b107d47a2c3b46 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Aug 2023 16:09:12 +0200 Subject: [PATCH] Ensure signals don't break on windows --- freqtrade/exchange/exchange.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 693b749e3..9e168dcb7 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2357,7 +2357,11 @@ class Exchange: pair=pair, since=since, until=until, from_id=from_id)) for sig in [signal.SIGINT, signal.SIGTERM]: - self.loop.add_signal_handler(sig, task.cancel) + try: + self.loop.add_signal_handler(sig, task.cancel) + except NotImplementedError: + # Not all platforms implement signals (e.g. windows) + pass return self.loop.run_until_complete(task) @retrier