mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pyterm: fix exit behavior if twisted is not available
This commit is contained in:
parent
89a26b7331
commit
1b5836571b
8
dist/tools/pyterm/pyterm
vendored
8
dist/tools/pyterm/pyterm
vendored
@ -248,8 +248,12 @@ class SerCmd(cmd.Cmd):
|
||||
# save history file
|
||||
readline.write_history_file()
|
||||
# shut down twisted if running
|
||||
if reactor.running:
|
||||
reactor.callFromThread(reactor.stop)
|
||||
try:
|
||||
if reactor.running:
|
||||
reactor.callFromThread(reactor.stop)
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
if self.tcp_serial:
|
||||
self.ser.close()
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user