diff options
author | kali <kali@leap.se> | 2012-09-06 02:27:04 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-06 02:27:04 +0900 |
commit | 8148bc9c8c113c41fcb18b397669b1f13447c653 (patch) | |
tree | 226ed4f238369f8937c28e3d0f11258cbfb7b506 /src/leap/eip/eipconnection.py | |
parent | c190b7f66cc1977d0e058bfa2d8fc1a850326320 (diff) |
more generic error handler in EipConductorAppMixin
documentation of the Exception Hierarchy and attributes.
also a bit of general cleanup around error handling in conductor.
Hopefully to be polished an abstracted to leap.base with time.
not all errors are converted (and the old with_errors/ignoring
errors) are still there, but we should be using this style of handlers
from now on.
wrapping up with this pseudo-feature for now. as we work on individual
features we can mimick the exceptions that are working.
Diffstat (limited to 'src/leap/eip/eipconnection.py')
-rw-r--r-- | src/leap/eip/eipconnection.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/eip/eipconnection.py b/src/leap/eip/eipconnection.py index e090f9a7..5c54a986 100644 --- a/src/leap/eip/eipconnection.py +++ b/src/leap/eip/eipconnection.py @@ -24,7 +24,6 @@ class EIPConnection(OpenVPNConnection): self.settingsfile = kwargs.get('settingsfile', None) self.logfile = kwargs.get('logfile', None) - # XXX USE THIS self.error_queue = Queue.Queue() status_signals = kwargs.pop('status_signals', None) @@ -33,6 +32,9 @@ class EIPConnection(OpenVPNConnection): super(EIPConnection, self).__init__(*args, **kwargs) + def has_errors(self): + return True if self.error_queue.qsize != 0 else True + def run_checks(self, skip_download=False): """ run all eip checks previous to attempting a connection |