diff --git a/CHANGELOG.md b/CHANGELOG.md index 525e8250..d013558e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixes - General - more fixes related to some backend commands hanging + - crashing when trying to retrieve a file size without proving its URL [#207](https://github.com/vinifmor/bauh/issues/207) + - Flatpak - not displaying update components not associated with installed packages - not displaying the updates size for Flatpak 1.2 diff --git a/bauh/api/http.py b/bauh/api/http.py index 1c459f2e..cc54d9d3 100644 --- a/bauh/api/http.py +++ b/bauh/api/http.py @@ -69,6 +69,9 @@ class HttpClient: return yaml.safe_load(res.text) if res else None def get_content_length_in_bytes(self, url: str, session: bool = True) -> Optional[int]: + if not url: + return None + params = {'url': url, 'allow_redirects': True, 'stream': True} try: