diff options
Diffstat (limited to 'src/leap/baseapp/network.py')
-rw-r--r-- | src/leap/baseapp/network.py | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/leap/baseapp/network.py b/src/leap/baseapp/network.py index 75690cc9..c73e8062 100644 --- a/src/leap/baseapp/network.py +++ b/src/leap/baseapp/network.py @@ -14,44 +14,10 @@ class NetworkCheckerAppMixin(object): """ def __init__(self, *args, **kwargs): - opts = kwargs.pop('opts', None) - config_file = getattr(opts, 'config_file', None) - - self.network_checker_started = False - self.network_checker = NetworkChecker( watcher_cb=self.newLogLine.emit, - status_signals=(self.statusChange.emit, ), + error_cb=self.handle_network_error, debug=self.debugmode) self.network_checker.run_checks() - self.error_check() - - def error_check(self): - """ - consumes the conductor error queue. - pops errors, and acts accordingly (launching user dialogs). - """ - logger.debug('error check') - - errq = self.conductor.error_queue - while errq.qsize() != 0: - logger.debug('%s errors left in network queue', errq.qsize()) - # we get exception and original traceback from queue - error, tb = errq.get() - - # redundant log, debugging the loop. - logger.error('%s: %s', error.__class__.__name__, error.message) - - if issubclass(error.__class__, eip_exceptions.EIPClientError): - self.handle_network_error(error) - - else: - # deprecated form of raising exception. - raise error, None, tb - - if error.failfirst is True: - break - def handle_network_error(self, error): - pass |