[fix][web] handling unexpected connection errors

This commit is contained in:
Vinicius Moreira
2020-06-08 18:17:27 -03:00
parent 0d4d4213a4
commit f4999b680c
3 changed files with 10 additions and 2 deletions

View File

@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.9.6] 2020
### Fixes
- Web
- handling unexpected connection errors
## [0.9.5] 2020-06-07
### Features
- new custom action (**+**) to open the system backups (snapshots). It is just a shortcut to Timeshift.

View File

@@ -1,4 +1,4 @@
__version__ = '0.9.5'
__version__ = '0.9.6'
__app_name__ = 'bauh'
import os

View File

@@ -838,7 +838,10 @@ class WebApplicationManager(SoftwareManager):
if not app.description:
app.description = self._get_app_description(app.url, soup)
find_url = not app.icon_url or (app.icon_url and not self.http_client.exists(app.icon_url, session=False))
try:
find_url = not app.icon_url or (app.icon_url and not self.http_client.exists(app.icon_url, session=False))
except (requests.exceptions.ConnectionError, requests.exceptions.ConnectTimeout):
find_url = None
if find_url:
app.icon_url = self._get_app_icon_url(app.url, soup)