From 54940b63264db7ebf37c4a3955a48f2bb12bc53c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 4 Jan 2025 03:44:37 +0300 Subject: [PATCH] fix updater --- src/updatenotif.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/updatenotif.py b/src/updatenotif.py index 36d3d55..c9a0f53 100644 --- a/src/updatenotif.py +++ b/src/updatenotif.py @@ -9,7 +9,7 @@ async def git_notifications_update(): cwd = os.getcwd() os.chdir(cwd) while True: - if termux_api == 0: + if termux_api: logger.info('Checking for updates...') fetching_git = os.system('git fetch') if fetching_git == 0: @@ -20,7 +20,7 @@ async def git_notifications_update(): logger.info('updates not found, nothing to do') else: os.system( - f"cat upd_info | termux-notification -i ub4tgupd --title 'ub4tg: update avalaible!' --button1 'Get update' --button1-action 'termux-notification-remove ub4tgupd'; cd {cwd}; git pull; termux-toast 'ub4tg updated, now restart it for apply update'") + f"cat upd_info | termux-notification -i ub4tgupd --title 'ub4tg: update avalaible!' --button1 'Get update' --button1-action 'termux-notification-remove ub4tgupd; cd {cwd}; git pull; termux-toast 'ub4tg updated, now restart it for apply update''") else: os.system( "termux-toast '[ub4tg]: failed fetching update, maybe connection error, check console log for more info'")