mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
fix: application is not initializing when there is no internet connection
This commit is contained in:
@@ -8,6 +8,8 @@ from multiprocessing import Process
|
||||
from pathlib import Path
|
||||
from threading import Thread
|
||||
|
||||
import requests
|
||||
|
||||
from bauh.api.http import HttpClient
|
||||
from bauh.gems.appimage import LOCAL_PATH, db
|
||||
|
||||
@@ -68,7 +70,11 @@ class DatabaseUpdater(Thread if bool(int(os.getenv('BAUH_DEBUG', 0))) else Proce
|
||||
def run(self):
|
||||
if self.enabled:
|
||||
while True:
|
||||
self._download_databases()
|
||||
try:
|
||||
self._download_databases()
|
||||
except requests.exceptions.ConnectionError:
|
||||
self.logger.warning('The internet connection seems to be off.')
|
||||
|
||||
self.logger.info('Sleeping')
|
||||
time.sleep(self.sleep)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user