diff options
author | kali <kali@leap.se> | 2012-08-08 07:22:36 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-08 07:22:36 +0900 |
commit | c217bd1f1456cf10ceabf698ea6f4dd8f636f454 (patch) | |
tree | 84bb8244c99c56b2c02e0c53162956dad8c46498 /src/leap/eip/conductor.py | |
parent | e81ddf7648e1075a15d8add11cd975a73aa09926 (diff) |
check for validity of the remote_ip entry (is ip?)
Diffstat (limited to 'src/leap/eip/conductor.py')
-rw-r--r-- | src/leap/eip/conductor.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/leap/eip/conductor.py b/src/leap/eip/conductor.py index 11b0358c..8f9d6051 100644 --- a/src/leap/eip/conductor.py +++ b/src/leap/eip/conductor.py @@ -8,12 +8,16 @@ import logging from leap.util.coroutines import spawn_and_watch_process -# XXX import eip.config as eipconfig +# XXX from leap.eip import config as eipconfig +# from leap.eip import exceptions as eip_exceptions + from leap.eip.config import (get_config, build_ovpn_command, check_or_create_default_vpnconf, check_vpn_keys, EIPNoPkexecAvailable, EIPNoPolkitAuthAgentAvailable, + EIPInitNoProviderError, + EIPInitBadProviderError, EIPInitNoKeyFileError, EIPInitBadKeyFilePermError) from leap.eip.vpnwatcher import EIPConnectionStatus, status_watcher @@ -103,6 +107,8 @@ to be triggered for each one of them. self.missing_auth_agent = False self.bad_keyfile_perms = False self.missing_vpn_keyfile = False + self.missing_provider = False + self.bad_provider = False self.command = None self.args = None @@ -162,7 +168,14 @@ to be triggered for each one of them. """ # TODO # - get --with-openvpn-config from opts - check_or_create_default_vpnconf(self.config) + try: + check_or_create_default_vpnconf(self.config) + except EIPInitNoProviderError: + logger.error('missing default provider definition') + self.missing_provider = True + except EIPInitBadProviderError: + logger.error('bad provider definition') + self.bad_provider = True def _get_or_create_config(self): """ |