Skip to content

Commit efed570

Browse files
committed
fix: handle RuntimeError on trades download
asyncio raises RuntimeError if the handler is not set on the main thread. closes freqtrade#12211
1 parent 5ddaea7 commit efed570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3259,7 +3259,7 @@ def get_historic_trades(
32593259
for sig in [signal.SIGINT, signal.SIGTERM]:
32603260
try:
32613261
self.loop.add_signal_handler(sig, task.cancel)
3262-
except NotImplementedError:
3262+
except (NotImplementedError, RuntimeError):
32633263
# Not all platforms implement signals (e.g. windows)
32643264
pass
32653265
return self.loop.run_until_complete(task)

0 commit comments

Comments
 (0)