diff options
author | kali <kali@leap.se> | 2012-09-20 03:15:13 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-20 03:15:13 +0900 |
commit | db704eecf513fcc48365844523557d6edab28293 (patch) | |
tree | f37516c86c5d77f23f7e57d80ee4c39b3b651c3e /src/leap/baseapp | |
parent | add7973b3d1633b2776cb90f237415c6cac65d99 (diff) | |
parent | 50396fca082652dd1a1617e0d029c1c726e4c651 (diff) |
Merge branch 'develop' into feature/systray-menu
Conflicts:
src/leap/app.py
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r-- | src/leap/baseapp/eip.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py index 68bd2f24..6c147cb4 100644 --- a/src/leap/baseapp/eip.py +++ b/src/leap/baseapp/eip.py @@ -1,5 +1,7 @@ +from __future__ import print_function import logging import time +import sys from PyQt4 import QtCore @@ -38,8 +40,9 @@ class EIPConductorAppMixin(object): debug=self.debugmode, ovpn_verbosity=opts.openvpn_verb) - # XXX remove skip download when sample service is ready - self.conductor.run_checks(skip_download=True) + # XXX get skip_download from cli flag + skip_download = False + self.conductor.run_checks(skip_download=skip_download) self.error_check() # XXX should receive "ready" signal @@ -58,13 +61,11 @@ class EIPConductorAppMixin(object): """ logger.debug('error check') - ##################################### - # XXX refactor in progress (by #504) - errq = self.conductor.error_queue while errq.qsize() != 0: logger.debug('%s errors left in conductor queue', errq.qsize()) - error = errq.get() + # 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) @@ -73,10 +74,8 @@ class EIPConductorAppMixin(object): self.handle_eip_error(error) else: - # This is not quite working. FIXME - import traceback - traceback.print_exc() - raise error + # deprecated form of raising exception. + raise error, None, tb if error.failfirst is True: break @@ -132,6 +131,8 @@ class EIPConductorAppMixin(object): ErrorDialog(errtype="critical", msg=message, label="critical error") + elif error.warning: + logger.warning(error.message) else: dialog = ErrorDialog() |