Fix pylint warnings
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ Bugs/limitations:
|
|||||||
from subprocess import call
|
from subprocess import call
|
||||||
from cmd import Cmd
|
from cmd import Cmd
|
||||||
|
|
||||||
from mininet.log import info, warn, cliinfo
|
from mininet.log import info, cliinfo
|
||||||
|
|
||||||
class CLI( Cmd ):
|
class CLI( Cmd ):
|
||||||
"Simple command-line interface to talk to nodes."
|
"Simple command-line interface to talk to nodes."
|
||||||
|
|||||||
+6
-1
@@ -126,6 +126,10 @@ class MininetLogger( Logger, object ):
|
|||||||
self.setLevel( level )
|
self.setLevel( level )
|
||||||
self.handlers[ 0 ].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()
|
# See /usr/lib/python2.5/logging/__init__.py; modified from warning()
|
||||||
def cliinfo( self, msg, *args, **kwargs ):
|
def cliinfo( self, msg, *args, **kwargs ):
|
||||||
"""Log 'msg % args' with severity 'CLIINFO'.
|
"""Log 'msg % args' with severity 'CLIINFO'.
|
||||||
@@ -138,8 +142,9 @@ class MininetLogger( Logger, object ):
|
|||||||
if self.manager.disable >= CLIINFO:
|
if self.manager.disable >= CLIINFO:
|
||||||
return
|
return
|
||||||
if self.isEnabledFor( CLIINFO ):
|
if self.isEnabledFor( CLIINFO ):
|
||||||
apply( self._log, ( CLIINFO, msg, args ), kwargs )
|
self._log( CLIINFO, msg, args, kwargs )
|
||||||
|
|
||||||
|
# pylint: enable-msg=E0202
|
||||||
|
|
||||||
lg = MininetLogger()
|
lg = MininetLogger()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user