From 74c3511d5c463417d0c5b5f451bceedc16afa8ed Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 4 Feb 2015 05:27:14 -0800 Subject: [PATCH] pass code check --- mininet/clean.py | 3 ++- mininet/link.py | 4 ++-- mininet/util.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mininet/clean.py b/mininet/clean.py index f6e7292..f2e4375 100755 --- a/mininet/clean.py +++ b/mininet/clean.py @@ -70,7 +70,8 @@ class Cleanup( object ): cleanUpScreens() info( "*** Removing excess kernel datapaths\n" ) - dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" ).splitlines() + dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" + ).splitlines() for dp in dps: if dp: sh( 'dpctl deldp ' + dp ) diff --git a/mininet/link.py b/mininet/link.py index 6a7d39e..9703ce7 100644 --- a/mininet/link.py +++ b/mininet/link.py @@ -377,6 +377,7 @@ class Link( object ): """A basic link is just a veth pair. Other types of links could be tunnels, link emulators, etc..""" + # pylint: disable=too-many-branches def __init__( self, node1, node2, port1=None, port2=None, intfName1=None, intfName2=None, addr1=None, addr2=None, intf=Intf, cls1=None, cls2=None, params1=None, @@ -395,7 +396,6 @@ class Link( object ): # This is a bit awkward; it seems that having everything in # params is more orthogonal, but being able to specify # in-line arguments is more convenient! So we support both. - # pylint: disable=too-many-branches if params1 is None: params1 = {} if params2 is None: @@ -429,7 +429,6 @@ class Link( object ): cls1 = intf if not cls2: cls2 = intf - # pylint: enable=too-many-branches intf1 = cls1( name=intfName1, node=node1, link=self, mac=addr1, **params1 ) @@ -438,6 +437,7 @@ class Link( object ): # All we are is dust in the wind, and our two interfaces self.intf1, self.intf2 = intf1, intf2 + # pylint: enable=too-many-branches @staticmethod def _ignore( *args, **kwargs ): diff --git a/mininet/util.py b/mininet/util.py index a262091..69052fd 100644 --- a/mininet/util.py +++ b/mininet/util.py @@ -543,6 +543,7 @@ def customConstructor( constructors, argStr ): # Return a customized subclass cls = constructor + class CustomClass( cls ): "Customized subclass, useful for Node, Link, and other classes" def __init__( self, name, *args, **params ):