Updated for get requests

This commit is contained in:
Dimitris Zlatanidis 2024-03-28 12:03:43 +02:00
parent dfec4344af
commit 5c056ff0ed

View file

@ -84,12 +84,12 @@ class CheckUpdates(Configs):
if local_chg_txt.is_file():
local_size: int = int(os.stat(local_chg_txt).st_size)
repo = self.http.request(
'GET', repo_chg_txt,
retries=self.urllib_retries,
redirect=self.urllib_redirect)
try: # Get repository changelog file size.
repo = self.http.request(
'GET', repo_chg_txt,
retries=self.urllib_retries,
redirect=self.urllib_redirect
)
repo_size: int = int(repo.headers.get('content-length', 0))
except KeyboardInterrupt:
raise SystemExit(1)