[snap] fix: not showing 'API is out' popup when there is no internet connection

This commit is contained in:
Vinicius Moreira
2019-10-24 14:52:25 -03:00
parent 97fe290bff
commit c323ed125b
6 changed files with 15 additions and 11 deletions

View File

@@ -307,13 +307,15 @@ class GenericSoftwareManager(SoftwareManager):
return updates
def list_warnings(self) -> List[str]:
def list_warnings(self, internet_available: bool = None) -> List[str]:
warnings = []
if self.managers:
int_available = internet.is_available(self.context.http_client, self.context.logger)
for man in self.managers:
if man.is_enabled():
man_warnings = man.list_warnings()
man_warnings = man.list_warnings(internet_available=int_available)
if man_warnings:
if warnings is None: