Skip to content
Snippets Groups Projects
Commit 74c3511d authored by Bob Lantz's avatar Bob Lantz
Browse files

pass code check

parent 5ac113cf
No related merge requests found
......@@ -70,7 +70,8 @@ def cleanup( cls):
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 )
......
......@@ -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 @@ def __init__( self, node1, node2, port1=None, port2=None,
# 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 @@ def __init__( self, node1, node2, port1=None, port2=None,
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 @@ def __init__( self, node1, node2, port1=None, port2=None,
# 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 ):
......
......@@ -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 ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment