mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 19:57:46 +00:00
spinel-cli: Clean exit (#585)
* spinel-cli: Use new clean eof termination of ot-ncp rather than CTRL+C. * Add coverage to NCP.
This commit is contained in:
committed by
Jonathan Hui
parent
09484288ed
commit
84079beb3a
@@ -98,11 +98,8 @@ class Node:
|
||||
|
||||
def __del__(self):
|
||||
if self.pexpect.isalive():
|
||||
if self.node_type == 'sim':
|
||||
self.send_command('exit')
|
||||
self.pexpect.expect(pexpect.EOF)
|
||||
elif self.node_type == 'ncp-sim':
|
||||
self.pexpect.sendcontrol('c');
|
||||
self.send_command('exit')
|
||||
self.pexpect.expect(pexpect.EOF)
|
||||
self.pexpect.terminate()
|
||||
self.pexpect.close(force=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user