mirror of
https://github.com/markqvist/rnsh.git
synced 2025-01-08 05:37:55 -05:00
Fix logging throws if event loop is set but not running
This commit is contained in:
parent
c7c75d5ea4
commit
f80823344b
@ -122,9 +122,12 @@ def _rns_log(msg, level=3, _override_destination=False):
|
|||||||
if tattr_orig is not None:
|
if tattr_orig is not None:
|
||||||
termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, tattr_orig)
|
termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, tattr_orig)
|
||||||
|
|
||||||
if _loop:
|
try:
|
||||||
_loop.call_soon_threadsafe(inner)
|
if _loop:
|
||||||
else:
|
_loop.call_soon_threadsafe(inner)
|
||||||
|
else:
|
||||||
|
inner()
|
||||||
|
except RuntimeError:
|
||||||
inner()
|
inner()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user