diff --git a/mininet/cli.py b/mininet/cli.py index 74a13c8..133d4dc 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -38,7 +38,7 @@ Bugs/limitations: 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 5352345..46334bf 100644 --- a/mininet/log.py +++ b/mininet/log.py @@ -126,6 +126,10 @@ class MininetLogger( Logger, object ): 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 @@ class MininetLogger( Logger, object ): 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()