summaryrefslogtreecommitdiff
path: root/src/leap/eip/conductor.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-03 10:18:50 +0900
committerkali <kali@leap.se>2012-08-03 10:18:50 +0900
commit5c34052ef9261a47947e3e03616fe34b099b9fa4 (patch)
tree0a952bf7ed1ce44b5f771260134263ad224f1373 /src/leap/eip/conductor.py
parent81613b2ef70e5d73b7c34eb4b78ee63189b45ab6 (diff)
stub for daemon mode; disabled by now until #383 is fixed
Diffstat (limited to 'src/leap/eip/conductor.py')
-rw-r--r--src/leap/eip/conductor.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/eip/conductor.py b/src/leap/eip/conductor.py
index 2d6ad764..eeb7f8f8 100644
--- a/src/leap/eip/conductor.py
+++ b/src/leap/eip/conductor.py
@@ -59,7 +59,8 @@ class OpenVPNConnection(object):
"""
# Connection Methods
- def __init__(self, config_file=None, watcher_cb=None):
+ def __init__(self, config_file=None,
+ watcher_cb=None, debug=False):
#XXX FIXME
#change watcher_cb to line_observer
"""
@@ -74,6 +75,8 @@ to be triggered for each one of them.
"""
# XXX get host/port from config
self.manager = OpenVPNManager()
+ self.debug = debug
+ print('conductor:%s' % debug)
self.config_file = config_file
self.watcher_cb = watcher_cb
@@ -99,7 +102,6 @@ to be triggered for each one of them.
home file, or config file passed in command line.
populates command and args to be passed to subprocess.
"""
- #print('get or create config')
config = get_config(config_file=self.config_file)
self.config = config
@@ -128,7 +130,8 @@ to be triggered for each one of them.
# no command in config, we build it up.
# XXX check also for command-line --command flag
try:
- command, args = build_ovpn_command(config)
+ command, args = build_ovpn_command(config,
+ debug=self.debug)
except EIPNoPkexecAvailable:
command = args = None
self.missing_pkexec = True