Corrected list checkin sendCmd.

This commit is contained in:
Bob Lantz
2010-03-13 13:59:03 -08:00
parent 74993b6536
commit e953444fa5
+2 -2
View File
@@ -134,13 +134,13 @@ class Node( object ):
"""Send a command, followed by a command to echo a sentinel, """Send a command, followed by a command to echo a sentinel,
and return without waiting for the command to complete.""" and return without waiting for the command to complete."""
assert not self.waiting assert not self.waiting
if isinstance( cmd, list ):
cmd = ' '.join( cmd )
if cmd[ -1 ] == '&': if cmd[ -1 ] == '&':
separator = '&' separator = '&'
cmd = cmd[ :-1 ] cmd = cmd[ :-1 ]
else: else:
separator = ';' separator = ';'
if isinstance( cmd, list ):
cmd = ' '.join( cmd )
self.write( cmd + separator + ' echo -n "\\0177" \n' ) self.write( cmd + separator + ' echo -n "\\0177" \n' )
self.waiting = True self.waiting = True