summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-18 05:54:50 +0900
committerkali <kali@leap.se>2012-12-18 05:54:50 +0900
commit75057e55828accb62beef1f73364edd82a75ed30 (patch)
treec275d39177d8b2d41e89010c6b04dd3417548fc8 /src/leap
parentf104e834c96c9ec10a465bda46ef05e87ea32516 (diff)
do not pass CA.crt to checks for https
also skip temporary errors when previous openvpn process vanishes.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/eip/checks.py3
-rw-r--r--src/leap/eip/openvpnconnection.py16
2 files changed, 11 insertions, 8 deletions
diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py
index d7f4402b..4afba8b6 100644
--- a/src/leap/eip/checks.py
+++ b/src/leap/eip/checks.py
@@ -84,8 +84,7 @@ class ProviderCertChecker(object):
# For MVS
checker.is_there_provider_ca()
- # XXX FAKE IT!!!
- checker.is_https_working(verify=do_verify, autocacert=True)
+ checker.is_https_working(verify=do_verify, autocacert=False)
checker.check_new_cert_needed(verify=do_verify)
def download_ca_cert(self, uri=None, verify=True):
diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py
index 253f5056..59ba44f0 100644
--- a/src/leap/eip/openvpnconnection.py
+++ b/src/leap/eip/openvpnconnection.py
@@ -275,12 +275,16 @@ to be triggered for each one of them.
"""
check if openvpn is already running
"""
- for process in psutil.get_process_list():
- if process.name == "openvpn":
- logger.debug('an openvpn instance is already running.')
- logger.debug('attempting to stop openvpn instance.')
- if not self._stop_openvpn():
- raise eip_exceptions.OpenVPNAlreadyRunning
+ try:
+ for process in psutil.get_process_list():
+ if process.name == "openvpn":
+ logger.debug('an openvpn instance is already running.')
+ logger.debug('attempting to stop openvpn instance.')
+ if not self._stop_openvpn():
+ raise eip_exceptions.OpenVPNAlreadyRunning
+
+ except psutil.error.NoSuchProcess:
+ logger.debug('detected a process which died. passing.')
logger.debug('no openvpn instance found.')