default(): add CR to error(); also clean up docstring
This commit is contained in:
+5
-4
@@ -399,15 +399,16 @@ class CLI( Cmd ):
|
|||||||
|
|
||||||
def default( self, line ):
|
def default( self, line ):
|
||||||
"""Called on an input line when the command prefix is not recognized.
|
"""Called on an input line when the command prefix is not recognized.
|
||||||
Overridden to run shell commands when a node is the first CLI argument.
|
Overridden to run shell commands when a node is the first
|
||||||
Past the first CLI argument, node names are automatically replaced with
|
CLI argument. Past the first CLI argument, node names are
|
||||||
corresponding IP addrs."""
|
automatically replaced with corresponding IP addrs."""
|
||||||
|
|
||||||
first, args, line = self.parseline( line )
|
first, args, line = self.parseline( line )
|
||||||
|
|
||||||
if first in self.mn:
|
if first in self.mn:
|
||||||
if not args:
|
if not args:
|
||||||
error( "*** Enter a command for node: %s <cmd>" % first )
|
error( '*** Please enter a command for node: %s <cmd>\n'
|
||||||
|
% first )
|
||||||
return
|
return
|
||||||
node = self.mn[ first ]
|
node = self.mn[ first ]
|
||||||
rest = args.split( ' ' )
|
rest = args.split( ' ' )
|
||||||
|
|||||||
Reference in New Issue
Block a user