def list_warnings(self, internet_available: bool = None) -> List[str]: warnings = [] int_available = internet.is_available() if int_available: updates_msg = check_for_update(self.logger, self.http_client, self.i18n) if updates_msg: warnings.append(updates_msg) if self.managers: for man in self.managers: if man.is_enabled(): man_warnings = man.list_warnings( internet_available=int_available) if man_warnings: if warnings is None: warnings = [] warnings.extend(man_warnings) return warnings
def run(self): while True: update_msg = check_for_update(http_client=self.http_client, logger=self.logger, i18n=self.i18n, tray=True) if update_msg: util.notify_user(msg=update_msg) self.sleep(self.interval)