From 6608efaf647b985505d9d90a0cf1120fd178ce64 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 29 Aug 2017 02:12:10 -0400 Subject: [bug] fix typo in logger usage --- src/leap/bitmask/vpn/management.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/leap') diff --git a/src/leap/bitmask/vpn/management.py b/src/leap/bitmask/vpn/management.py index 0665169b..753f7435 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: -- cgit v1.2.3