fix: not internet connection scenario when reading installed and searching

This commit is contained in:
Vinicius Moreira
2019-09-24 12:26:33 -03:00
parent 3c51046668
commit e56ecc8f49
14 changed files with 160 additions and 72 deletions

View File

@@ -28,7 +28,11 @@ class HttpClient:
if self.sleep > 0:
time.sleep(self.sleep)
except:
except Exception as e:
if isinstance(e, requests.exceptions.ConnectionError):
self.logger.error('Internet seems to be off')
raise
self.logger.error("Could not retrieve data from '{}'".format(url))
traceback.print_exc()
continue