From 1c07dfaf21ae7e79629bb639cbd0626b84d285b0 Mon Sep 17 00:00:00 2001 From: titulebolide Date: Wed, 19 Jan 2022 11:15:06 +0100 Subject: [PATCH] fix version checking for tg bot --- btb_manager_telegram/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/btb_manager_telegram/utils.py b/btb_manager_telegram/utils.py index ed97f51..ead9245 100644 --- a/btb_manager_telegram/utils.py +++ b/btb_manager_telegram/utils.py @@ -204,8 +204,10 @@ def is_btb_bot_update_available(): .decode() .rstrip("\n") ) - current_version = current_version.split("-")[0] - remote_version = remote_version.split("-")[0] + print(current_version, remote_version) + + current_version = "-".join(current_version.split("-")[:-2]) + remote_version = "-".join(remote_version.split("-")[:-2]) re = current_version != remote_version except Exception as e: logger.error(e, exc_info=True)