Skip to content
Snippets Groups Projects
Commit c5779dee authored by Bob Lantz's avatar Bob Lantz
Browse files

Pass code check

parent 79c944ae
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,7 @@ def __init__( self, mininet, stdin=sys.stdin, script=None ): ...@@ -68,6 +68,7 @@ def __init__( self, mininet, stdin=sys.stdin, script=None ):
self.run() self.run()
readlineInited = False readlineInited = False
@classmethod @classmethod
def initReadline( cls ): def initReadline( cls ):
"Set up history if readline is available" "Set up history if readline is available"
...@@ -101,10 +102,12 @@ def run( self ): ...@@ -101,10 +102,12 @@ def run( self ):
break break
except KeyboardInterrupt: except KeyboardInterrupt:
# Output a message - unless it's also interrupted # Output a message - unless it's also interrupted
# pylint: disable=broad-except
try: try:
output( '\nInterrupt\n' ) output( '\nInterrupt\n' )
except: except Exception:
pass pass
# pylint: enable=broad-except
def emptyline( self ): def emptyline( self ):
"Don't repeat last command when you hit return." "Don't repeat last command when you hit return."
......
...@@ -54,7 +54,8 @@ def makeTerm( node, title='Node', term='xterm', display=None, cmd='bash'): ...@@ -54,7 +54,8 @@ def makeTerm( node, title='Node', term='xterm', display=None, cmd='bash'):
display, tunnel = tunnelX11( node, display ) display, tunnel = tunnelX11( node, display )
if display is None: if display is None:
return [] return []
term = node.popen( cmds[ term ] + [ display, '-e', 'env TERM=ansi %s' % cmd ] ) term = node.popen( cmds[ term ] +
[ display, '-e', 'env TERM=ansi %s' % cmd ] )
return [ tunnel, term ] if tunnel else [ term ] return [ tunnel, term ] if tunnel else [ term ]
def runX11( node, cmd ): def runX11( node, cmd ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment