diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-07-23 16:48:12 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-07-23 16:48:12 +0200 |
commit | d6e1d9c1cef028e267e70875f706b9378564ddef (patch) | |
tree | 907720d826d97b008d56aa3455162e17c4c4e8a6 /src/leap/bitmask/vpn/process.py | |
parent | 1bb23d6cb31b0b3ce4fa3e4bf8f71589726cccf7 (diff) |
[bug] return allways a valid state from openvpn
Even if we don't recognize the state that openvpn is providing. Add
TCP_CONNECT state as well.
Diffstat (limited to 'src/leap/bitmask/vpn/process.py')
-rw-r--r-- | src/leap/bitmask/vpn/process.py | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py index d1d929d7..7150410e 100644 --- a/src/leap/bitmask/vpn/process.py +++ b/src/leap/bitmask/vpn/process.py @@ -250,19 +250,13 @@ class _VPNProcess(protocol.ProcessProtocol): def status(self): if self.failed: return {'status': 'failed', 'error': self.errmsg} - try: - state = self.getState() - if state: - _status = state.simple.lower() - status = {'status': _status, 'error': None} - except AttributeError: - raise - # BUG -- glitch due to proto.state transition? - # still needed? - # state = self.getState() - # if state: - # _status = state.simple.lower() - # status = {'status': _status, 'error': None} + + state = self.getState() + if state: + _status = state.simple.lower() + else: + _status = None + status = {'status': _status, 'error': None} if self.proto and self.proto.traffic: remote = self.proto.remote |