Fix pylint warnings

This commit is contained in:
Brandon Heller
2010-03-04 22:36:34 -08:00
parent f259e2fa1c
commit 7ae73e677f
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -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."
+6 -1
View File
@@ -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()