summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-29 02:12:10 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:20:35 -0400
commit6608efaf647b985505d9d90a0cf1120fd178ce64 (patch)
tree494b00648a9e3801efcec9be3d67a333ad841e62 /src/leap
parent9f124cc66615e92814576748bc414584962ef9da (diff)
[bug] fix typo in logger usage
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/vpn/management.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/bitmask/vpn/management.py b/src/leap/bitmask/vpn/management.py
index 0665169..753f743 100644
--- a/src/leap/bitmask/vpn/management.py
+++ b/src/leap/bitmask/vpn/management.py
@@ -25,7 +25,7 @@ from collections import OrderedDict
from twisted.protocols.basic import LineReceiver
from twisted.internet.defer import Deferred
-from twisted.python import log
+from twisted.logger import Logger
from zope.interface import Interface
@@ -40,6 +40,8 @@ class IStateListener(Interface):
class ManagementProtocol(LineReceiver):
+ log = Logger()
+
def __init__(self, verbose=False):
self.verbose = verbose
@@ -117,8 +119,9 @@ class ManagementProtocol(LineReceiver):
self._linebuf.append(line)
def _handle_unknown(self, infotype, data):
- log.msg('Received unhandled infotype %s with data %s' %
- (infotype, data))
+ self.log.msg(
+ 'Received unhandled infotype %s with data %s' %
+ (infotype, data))
def _handle_BYTECOUNT(self, data):
down, up = data.split(',')
@@ -160,7 +163,7 @@ class ManagementProtocol(LineReceiver):
raise ValueError(
'Cannot parse state data! %s' % data)
except Exception as exc:
- log.error('Failure parsing data: %s' % exc)
+ self.log.error('Failure parsing data: %s' % exc)
return
if state != self.state: