1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

Merge pull request #1582 from N8Fear/fix_pyterm_twisted

pyterm: fix exit behavior if twisted is not available
This commit is contained in:
Ludwig Ortmann 2014-08-16 08:31:20 +02:00
commit 91d4a25c12

View File

@ -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