mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Ensure signals don't break on windows
This commit is contained in:
parent
f92b8c50dd
commit
4c5f992670
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user