From e0cfcdd5054d8387ad95988c5e73f80d0823a939 Mon Sep 17 00:00:00 2001 From: Bob Lantz <rlantz@cs.stanford.edu> Date: Mon, 1 Mar 2010 15:21:29 -0800 Subject: [PATCH] Tweaks to pass code check. --- bin/mn | 8 ++++---- mininet/cli.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/mn b/bin/mn index 8e04df2c..33372443 100755 --- a/bin/mn +++ b/bin/mn @@ -81,9 +81,9 @@ class MininetRunner( object ): self.parseArgs() self.setup() self.begin() - + def setCustom( self, name, value ): - print "got", self, name, value + "Set custom parameters for MininetRunner." if name in ( 'topos', 'switches', 'hosts', 'controllers' ): # Update dictionaries param = name.upper() @@ -94,7 +94,7 @@ class MininetRunner( object ): else: # Add or modify global variable or class globals()[ name ] = value - + def parseCustomFile( self, fileName ): "Parse custom file and add params before parsing cmd-line options." custom = {} @@ -104,7 +104,7 @@ class MininetRunner( object ): self.setCustom( name, custom[ name ] ) else: raise Exception( 'could not find custom file: %s' % fileName ) - + def parseArgs( self ): """Parse command-line args and return options object. returns: opts parse options dict""" diff --git a/mininet/cli.py b/mininet/cli.py index 98bfd304..cefb75b6 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -91,8 +91,8 @@ def do_net( self, args ): for switch in self.mn.switches: info( '%s <->', switch.name ) for intf in switch.intfs: - node, name = switch.connection[ intf ] - info( ' %s' % node.name ) + name = switch.connection[ intf ][ 1 ] + info( ' %s' % name ) info( '\n' ) def do_sh( self, args ): -- GitLab