diff --git a/mininet/node.py b/mininet/node.py index a065533..566e3df 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -995,6 +995,12 @@ class Controller( Node ): def checkListening( self ): "Make sure no controllers are running on our port" + # Verify that Telnet is installed first: + out, err, returnCode = errRun( "which telnet" ) + if 'telnet' not in out or returnCode != 0: + raise Exception( "Error running telnet to check for listening " + "controllers; please check that it is " + "installed." ) listening = self.cmd( "echo A | telnet -e A %s %d" % ( self.ip, self.port ) ) if 'Unable' not in listening: