mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[improvement] handling internet timeout errors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user