Minor tweak of return value.

This commit is contained in:
Bob Lantz
2014-02-03 17:55:25 -08:00
parent 0b5609f587
commit 74c71bc8a4
+1 -1
View File
@@ -777,7 +777,7 @@ class Switch( Node ):
raise Exception( 'Unable to derive default datapath ID - '
'please either specify a dpid or use a '
'canonical switch name such as s23.' )
return ( '0' * self.dpidLen + dpid )[ -self.dpidLen : ]
return '0' * ( self.dpidLen - len( dpid ) ) + dpid
def defaultIntf( self ):
"Return control interface"