Prevent Mininet from crashing when display not set

fixes #173
This commit is contained in:
Brian O'Connor
2013-07-26 14:43:27 -07:00
parent 1f07530a54
commit 4316be95c2
2 changed files with 11 additions and 1 deletions
+3
View File
@@ -335,6 +335,9 @@ class Mininet( object ):
def startTerms( self ):
"Start a terminal for each node."
if 'DISPLAY' not in os.environ:
error( "Error starting terms: Cannot connect to display\n" )
return
info( "*** Running terms on %s\n" % os.environ[ 'DISPLAY' ] )
cleanUpScreens()
self.terms += makeTerms( self.controllers, 'controller' )