From 74c71bc8a4d16d6c2ba8f6447f312bb58a0e4ff7 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Mon, 3 Feb 2014 17:55:25 -0800 Subject: [PATCH] Minor tweak of return value. --- mininet/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/node.py b/mininet/node.py index b33346c..ffe38b6 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -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"