From 7ae73e677f1641439d763158e6a9dd6c9240dc51 Mon Sep 17 00:00:00 2001 From: Brandon Heller <brandonh@stanford.edu> Date: Thu, 4 Mar 2010 22:36:34 -0800 Subject: [PATCH] Fix pylint warnings --- mininet/cli.py | 2 +- mininet/log.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mininet/cli.py b/mininet/cli.py index 74a13c82..133d4dce 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -38,7 +38,7 @@ from subprocess import call from cmd import Cmd -from mininet.log import info, warn, cliinfo +from mininet.log import info, cliinfo class CLI( Cmd ): "Simple command-line interface to talk to nodes." diff --git a/mininet/log.py b/mininet/log.py index 53523454..46334bf5 100644 --- a/mininet/log.py +++ b/mininet/log.py @@ -126,6 +126,10 @@ def setLogLevel( self, levelname=None ): self.setLevel( level ) self.handlers[ 0 ].setLevel( level ) + # pylint: disable-msg=E0202 + # "An attribute inherited from mininet.log hide this method" + # Not sure why this is occurring - this function definitely gets called. + # See /usr/lib/python2.5/logging/__init__.py; modified from warning() def cliinfo( self, msg, *args, **kwargs ): """Log 'msg % args' with severity 'CLIINFO'. @@ -138,8 +142,9 @@ def cliinfo( self, msg, *args, **kwargs ): if self.manager.disable >= CLIINFO: return if self.isEnabledFor( CLIINFO ): - apply( self._log, ( CLIINFO, msg, args ), kwargs ) + self._log( CLIINFO, msg, args, kwargs ) + # pylint: enable-msg=E0202 lg = MininetLogger() -- GitLab