pep8: Fix E121/126, continuation line indention

This commit is contained in:
Brandon Heller
2012-11-13 16:08:26 -08:00
parent 33d548b412
commit c0095746af
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ def bwtest( cpuLimits, period_us=100000, seconds=5 ):
server.cmd( 'iperf -s -p 5001 &' ) server.cmd( 'iperf -s -p 5001 &' )
waitListening( client, server, 5001 ) waitListening( client, server, 5001 )
result = client.cmd( 'iperf -yc -t %s -c %s' % ( result = client.cmd( 'iperf -yc -t %s -c %s' % (
seconds, server.IP() ) ).split( ',' ) seconds, server.IP() ) ).split( ',' )
bps = float( result[ -1 ] ) bps = float( result[ -1 ] )
server.cmdPrint( 'kill %iperf' ) server.cmdPrint( 'kill %iperf' )
net.stop() net.stop()
+5 -5
View File
@@ -515,7 +515,7 @@ class Node( object ):
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() ) intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
for i in self.intfList() ] ) ) for i in self.intfList() ] ) )
return '<%s %s: %s pid=%s> ' % ( return '<%s %s: %s pid=%s> ' % (
self.__class__.__name__, self.name, intfs, self.pid ) self.__class__.__name__, self.name, intfs, self.pid )
def __str__( self ): def __str__( self ):
"Abbreviated string representation" "Abbreviated string representation"
@@ -683,7 +683,7 @@ class CPULimitedHost( Host ):
# We have to do this here after we've specified # We have to do this here after we've specified
# cpus and mems # cpus and mems
errFail( 'cgclassify -g cpuset:/%s %s' % ( errFail( 'cgclassify -g cpuset:/%s %s' % (
self.name, self.pid ) ) self.name, self.pid ) )
def config( self, cpu=None, cores=None, **params ): def config( self, cpu=None, cores=None, **params ):
"""cpu: desired overall system CPU fraction """cpu: desired overall system CPU fraction
@@ -777,7 +777,7 @@ class Switch( Node ):
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() ) intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
for i in self.intfList() ] ) ) for i in self.intfList() ] ) )
return '<%s %s: %s pid=%s> ' % ( return '<%s %s: %s pid=%s> ' % (
self.__class__.__name__, self.name, intfs, self.pid ) self.__class__.__name__, self.name, intfs, self.pid )
class UserSwitch( Switch ): class UserSwitch( Switch ):
"User-space switch." "User-space switch."
@@ -1021,8 +1021,8 @@ class Controller( Node ):
def __repr__( self ): def __repr__( self ):
"More informative string representation" "More informative string representation"
return '<%s %s: %s:%s pid=%s> ' % ( return '<%s %s: %s:%s pid=%s> ' % (
self.__class__.__name__, self.name, self.__class__.__name__, self.name,
self.IP(), self.port, self.pid ) self.IP(), self.port, self.pid )
class OVSController( Controller ): class OVSController( Controller ):