Fix version comparison to use packaging.version

This commit is contained in:
Matthias 2023-01-16 06:54:29 +01:00
parent dc7b8ac7ba
commit 0296061e49

View File

@ -1,5 +1,7 @@
import logging
from packaging import version
from freqtrade.constants import Config
from freqtrade.enums.tradingmode import TradingMode
from freqtrade.exceptions import OperationalException
@ -19,7 +21,7 @@ def migrate_binance_futures_names(config: Config):
# only act on new futures
return
import ccxt
if "2.6.6" > ccxt.__version__:
if version.parse("2.6.6") > version.parse(ccxt.__version__):
raise OperationalException(
"Please follow the update instructions in the docs "
"(https://www.freqtrade.io/en/latest/updating/) to install a compatible ccxt version.")