Pass code check
This commit is contained in:
+4
-1
@@ -68,6 +68,7 @@ class CLI( Cmd ):
|
|||||||
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 @@ class CLI( Cmd ):
|
|||||||
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."
|
||||||
|
|||||||
+2
-1
@@ -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 ):
|
||||||
|
|||||||
Reference in New Issue
Block a user