default(): add CR to error(); also clean up docstring

This commit is contained in:
Bob Lantz
2017-02-08 16:30:36 -08:00
parent dfb2594793
commit 0b5d24148b
+5 -4
View File
@@ -399,15 +399,16 @@ class CLI( Cmd ):
def default( self, line ):
"""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.
Past the first CLI argument, node names are automatically replaced with
corresponding IP addrs."""
Overridden to run shell commands when a node is the first
CLI argument. Past the first CLI argument, node names are
automatically replaced with corresponding IP addrs."""
first, args, line = self.parseline( line )
if first in self.mn:
if not args:
error( "*** Enter a command for node: %s <cmd>" % first )
error( '*** Please enter a command for node: %s <cmd>\n'
% first )
return
node = self.mn[ first ]
rest = args.split( ' ' )