mirror of
https://github.com/markqvist/rnsh.git
synced 2025-03-10 17:39:17 -04:00
Fix exceptions when using -p option
This commit is contained in:
parent
0b7fd9cedd
commit
5860317743
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "rnsh"
|
||||
version = "0.0.1"
|
||||
version = "0.0.2"
|
||||
description = "Shell over Reticulum"
|
||||
authors = ["acehoss <acehoss@acehoss.net>"]
|
||||
license = "MIT"
|
||||
|
@ -107,13 +107,15 @@ def _rns_log(msg, level=3, _override_destination=False):
|
||||
|
||||
def _rns_log_inner():
|
||||
nonlocal msg, level, _override_destination
|
||||
try:
|
||||
with process.TTYRestorer(sys.stdin.fileno()) as tr:
|
||||
with exception.permit(SystemExit):
|
||||
attr = tr.current_attr()
|
||||
attr[process.TTYRestorer.ATTR_IDX_OFLAG] = attr[process.TTYRestorer.ATTR_IDX_OFLAG] | \
|
||||
termios.ONLRET | termios.ONLCR | termios.OPOST
|
||||
tr.set_attr(attr)
|
||||
_rns_log_orig(msg, level, _override_destination)
|
||||
except ValueError:
|
||||
_rns_log_orig(msg, level, _override_destination)
|
||||
|
||||
try:
|
||||
if _loop:
|
||||
|
Loading…
x
Reference in New Issue
Block a user