diff options
author | Kali Kaneko <kali@leap.se> | 2017-08-22 16:38:13 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-30 16:17:56 -0400 |
commit | 49a421188febe06e66412260a828b92a543fbe99 (patch) | |
tree | d9389cface18ad2927186f9210e648711c3052a9 /src/leap/bitmask/vpn/management.py | |
parent | 46eff942e4e3b3c7ddbecd170dd7d5078b8debc0 (diff) |
[refactor] integrate new management protocol
Diffstat (limited to 'src/leap/bitmask/vpn/management.py')
-rw-r--r-- | src/leap/bitmask/vpn/management.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/bitmask/vpn/management.py b/src/leap/bitmask/vpn/management.py index b9bda6c9..1994e0bf 100644 --- a/src/leap/bitmask/vpn/management.py +++ b/src/leap/bitmask/vpn/management.py @@ -23,7 +23,6 @@ Handles an OpenVPN process through its Management Interface. import time from collections import OrderedDict -from twisted.internet import defer from twisted.protocols.basic import LineReceiver from twisted.internet.defer import Deferred from twisted.python import log @@ -68,6 +67,9 @@ class ManagementProtocol(LineReceiver): def lineReceived(self, line): if self.verbose: + # TODO get an integer parameter instead + # TODO if very verbose, print everything + # if less verbose, print (log) only the "DEBUG" lines. print line if line[0] == '>': @@ -191,7 +193,7 @@ class ManagementProtocol(LineReceiver): def _parsePid(self, result): self.pid = int(result.split('=')[1]) - def get_pid(self): + def getPid(self): d = self._pushdef() self.sendLine('pid') d.addCallback(self._parsePid) |