diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-10-14 15:34:42 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-10-14 16:36:09 -0300 |
commit | 23107e1cf7670b0ee01c73284bbf9d7a21e4a92c (patch) | |
tree | 6e38cb7a71ab983f1d15476a23b3e760a6e97ed0 /src/leap/bitmask/services/eip | |
parent | 96ddbd359804d47f81b9572dd56f4a991d7c1e36 (diff) |
Default UP/DOWN_SCRIPTs to None and add them only if not None
Diffstat (limited to 'src/leap/bitmask/services/eip')
-rw-r--r-- | src/leap/bitmask/services/eip/vpnlauncher.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/leap/bitmask/services/eip/vpnlauncher.py b/src/leap/bitmask/services/eip/vpnlauncher.py index 2ac4c325..bce3599b 100644 --- a/src/leap/bitmask/services/eip/vpnlauncher.py +++ b/src/leap/bitmask/services/eip/vpnlauncher.py @@ -102,6 +102,8 @@ class VPNLauncher(object): UPDOWN_FILES = None OTHER_FILES = None + UP_SCRIPT = None + DOWN_SCRIPT = None @classmethod @abstractmethod @@ -211,15 +213,17 @@ class VPNLauncher(object): '--script-security', '2' ] - if _has_updown_scripts(kls.UP_SCRIPT): - args += [ - '--up', '\"%s\"' % (kls.UP_SCRIPT,), - ] - - if _has_updown_scripts(kls.DOWN_SCRIPT): - args += [ - '--down', '\"%s\"' % (kls.DOWN_SCRIPT,) - ] + if kls.UP_SCRIPT is not None: + if _has_updown_scripts(kls.UP_SCRIPT): + args += [ + '--up', '\"%s\"' % (kls.UP_SCRIPT,), + ] + + if kls.DOWN_SCRIPT is not None: + if _has_updown_scripts(kls.DOWN_SCRIPT): + args += [ + '--down', '\"%s\"' % (kls.DOWN_SCRIPT,) + ] ########################################################### # For the time being we are disabling the usage of the |