Fixed for KeyboardInterrupt

This commit is contained in:
Dimitris Zlatanidis 2023-05-17 20:49:35 +03:00
parent 0ae69ef5f2
commit 0c66d5d39c

View file

@ -97,9 +97,12 @@ class CheckUpdates(Configs):
if self.proxy_address.startswith('socks'):
self.set_socks_proxy_server()
repo = self.http.request('GET', repo_chg_txt)
if local_chg_txt.is_file():
local_size: int = int(os.stat(local_chg_txt).st_size)
try:
repo = self.http.request('GET', repo_chg_txt)
if local_chg_txt.is_file():
local_size: int = int(os.stat(local_chg_txt).st_size)
except KeyboardInterrupt:
raise SystemExit(1)
repo_size: int = int(repo.headers['Content-Length'])