pep8: fix E128 continuation line under-indented errors
I wasn't sure this was worth fixing at first, but it does look more readable now.
This commit is contained in:
@@ -68,8 +68,11 @@ LINKS = { 'default': Link,
|
|||||||
TESTS = [ 'cli', 'build', 'pingall', 'pingpair', 'iperf', 'all', 'iperfudp',
|
TESTS = [ 'cli', 'build', 'pingall', 'pingpair', 'iperf', 'all', 'iperfudp',
|
||||||
'none' ]
|
'none' ]
|
||||||
|
|
||||||
ALTSPELLING = { 'pingall': 'pingAll', 'pingpair': 'pingPair',
|
ALTSPELLING = { 'pingall': 'pingAll',
|
||||||
'iperfudp': 'iperfUdp', 'iperfUDP': 'iperfUdp', 'prefixlen': 'prefixLen' }
|
'pingpair': 'pingPair',
|
||||||
|
'iperfudp': 'iperfUdp',
|
||||||
|
'iperfUDP': 'iperfUdp',
|
||||||
|
'prefixlen': 'prefixLen' }
|
||||||
|
|
||||||
|
|
||||||
def addDictOption( opts, choicesDict, default, name, helpStr=None ):
|
def addDictOption( opts, choicesDict, default, name, helpStr=None ):
|
||||||
|
|||||||
@@ -169,11 +169,8 @@ class Graph( Frame ):
|
|||||||
|
|
||||||
"Graph that we can add bars to over time."
|
"Graph that we can add bars to over time."
|
||||||
|
|
||||||
def __init__( self, parent=None,
|
def __init__( self, parent=None, bg = 'white', gheight=200, gwidth=500,
|
||||||
bg = 'white',
|
barwidth=10, ymax=3.5,):
|
||||||
gheight=200, gwidth=500,
|
|
||||||
barwidth=10,
|
|
||||||
ymax=3.5,):
|
|
||||||
|
|
||||||
Frame.__init__( self, parent )
|
Frame.__init__( self, parent )
|
||||||
|
|
||||||
|
|||||||
@@ -322,8 +322,8 @@ class MiniEdit( Frame ):
|
|||||||
self.nodeCount += 1
|
self.nodeCount += 1
|
||||||
name = self.nodePrefixes[ node ] + str( self.nodeCount )
|
name = self.nodePrefixes[ node ] + str( self.nodeCount )
|
||||||
icon = self.nodeIcon( node, name )
|
icon = self.nodeIcon( node, name )
|
||||||
item = self.canvas.create_window( x, y, anchor='c',
|
item = self.canvas.create_window( x, y, anchor='c', window=icon,
|
||||||
window=icon, tags=node )
|
tags=node )
|
||||||
self.widgetToItem[ icon ] = item
|
self.widgetToItem[ icon ] = item
|
||||||
self.itemToWidget[ item ] = icon
|
self.itemToWidget[ item ] = icon
|
||||||
self.selectItem( item )
|
self.selectItem( item )
|
||||||
|
|||||||
+3
-2
@@ -202,7 +202,7 @@ class TCIntf( Intf ):
|
|||||||
elif use_tbf:
|
elif use_tbf:
|
||||||
if latency_ms is None:
|
if latency_ms is None:
|
||||||
latency_ms = 15 * 8 / bw
|
latency_ms = 15 * 8 / bw
|
||||||
cmds += ['%s qdisc add dev %s root handle 1: tbf ' +
|
cmds += [ '%s qdisc add dev %s root handle 1: tbf ' +
|
||||||
'rate %fMbit burst 15000 latency %fms' %
|
'rate %fMbit burst 15000 latency %fms' %
|
||||||
( bw, latency_ms ) ]
|
( bw, latency_ms ) ]
|
||||||
else:
|
else:
|
||||||
@@ -283,7 +283,8 @@ class TCIntf( Intf ):
|
|||||||
# Bandwidth limits via various methods
|
# Bandwidth limits via various methods
|
||||||
bwcmds, parent = self.bwCmds( bw=bw, speedup=speedup,
|
bwcmds, parent = self.bwCmds( bw=bw, speedup=speedup,
|
||||||
use_hfsc=use_hfsc, use_tbf=use_tbf,
|
use_hfsc=use_hfsc, use_tbf=use_tbf,
|
||||||
latency_ms=latency_ms, enable_ecn=enable_ecn,
|
latency_ms=latency_ms,
|
||||||
|
enable_ecn=enable_ecn,
|
||||||
enable_red=enable_red )
|
enable_red=enable_red )
|
||||||
cmds += bwcmds
|
cmds += bwcmds
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -789,7 +789,8 @@ class UserSwitch( Switch ):
|
|||||||
name: name for the switch"""
|
name: name for the switch"""
|
||||||
Switch.__init__( self, name, **kwargs )
|
Switch.__init__( self, name, **kwargs )
|
||||||
pathCheck( 'ofdatapath', 'ofprotocol',
|
pathCheck( 'ofdatapath', 'ofprotocol',
|
||||||
moduleName='the OpenFlow reference user switch (openflow.org)' )
|
moduleName='the OpenFlow reference user switch' +
|
||||||
|
'(openflow.org)' )
|
||||||
if self.listenPort:
|
if self.listenPort:
|
||||||
self.opts += ' --listen=ptcp:%i ' % self.listenPort
|
self.opts += ' --listen=ptcp:%i ' % self.listenPort
|
||||||
|
|
||||||
@@ -1053,7 +1054,8 @@ class NOX( Controller ):
|
|||||||
command=noxCoreDir + '/nox_core',
|
command=noxCoreDir + '/nox_core',
|
||||||
cargs='--libdir=/usr/local/lib -v -i ptcp:%s ' +
|
cargs='--libdir=/usr/local/lib -v -i ptcp:%s ' +
|
||||||
' '.join( noxArgs ),
|
' '.join( noxArgs ),
|
||||||
cdir=noxCoreDir, **kwargs )
|
cdir=noxCoreDir,
|
||||||
|
**kwargs )
|
||||||
|
|
||||||
|
|
||||||
class RemoteController( Controller ):
|
class RemoteController( Controller ):
|
||||||
@@ -1066,8 +1068,7 @@ class RemoteController( Controller ):
|
|||||||
ip: the IP address where the remote controller is
|
ip: the IP address where the remote controller is
|
||||||
listening
|
listening
|
||||||
port: the port where the remote controller is listening"""
|
port: the port where the remote controller is listening"""
|
||||||
Controller.__init__( self, name, ip=ip, port=port,
|
Controller.__init__( self, name, ip=ip, port=port, **kwargs )
|
||||||
**kwargs )
|
|
||||||
|
|
||||||
def start( self ):
|
def start( self ):
|
||||||
"Overridden to do nothing."
|
"Overridden to do nothing."
|
||||||
|
|||||||
Reference in New Issue
Block a user