[improvement] handling internet timeout errors

This commit is contained in:
Vinícius Moreira
2020-02-11 17:27:24 -03:00
parent fb8229e1ac
commit 2b9f4bf69f
2 changed files with 2 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- UI:
- **Settings** available as a tray action as well
- minor improvements
- handling internet timeout errors
## [0.8.2] - 2020-01-31
### Features

View File

@@ -9,7 +9,7 @@ def is_available(client: HttpClient, logger: logging.Logger) -> bool:
try:
client.exists('https://google.com')
return True
except requests.exceptions.ConnectionError:
except (requests.exceptions.ConnectionError, requests.exceptions.ReadTimeout):
if logger:
logger.warning('Internet connection seems to be off')
return False