Updated for local size

This commit is contained in:
Dimitris Zlatanidis 2023-06-06 23:32:11 +03:00
parent 61ad20ed43
commit 0aa3dd6701

View file

@ -101,8 +101,6 @@ class CheckUpdates(Configs):
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)
except HTTPError:
@ -111,6 +109,9 @@ class CheckUpdates(Configs):
else:
repo_size: int = int(repo.headers['Content-Length'])
if local_chg_txt.is_file():
local_size: int = int(os.stat(local_chg_txt).st_size)
logger = logging.getLogger(LoggingConfig.date_time)
logger.info(f'{self.__class__.__name__}: '
f'{self.__class__.compare_the_changelogs.__name__}: '