Skip to content

Commit 2fc5514

Browse files
author
nothing
committed
added more logging
1 parent ea24201 commit 2fc5514

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

updater.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,19 @@ def main():
121121
online_version, download_url = get_online_version_and_url()
122122

123123
if installed_version != online_version:
124+
logger.info('Update available')
124125
MessageBox = ctypes.windll.user32.MessageBoxW
125126
result = MessageBox(None, f'Version {online_version} of the Keychron software is available. Do you want to download it?', 'New version available', 1)
126127
if result == 1:
128+
logger.info('User selected to update the software')
127129
tmp_path = tempfile.mkdtemp()
128130
download_and_extract_file(download_url, tmp_path)
129131
run_exe(tmp_path)
130132
shutil.rmtree(tmp_path)
133+
else:
134+
logger.info('User selected not to update the software')
135+
else:
136+
logger.info('No update available')
131137
except Exception as e:
132138
logging.error(f"An error occurred in main function: {e}")
133139
messagebox.showerror("Error", f"An error occurred in main function: {e}")

0 commit comments

Comments
 (0)