More work on ssh bootstrap
This commit is contained in:
+1
-3
@@ -2106,9 +2106,7 @@ screen_handle_print(Screen *self, PyObject *msg) {
|
||||
|
||||
void
|
||||
screen_handle_echo(Screen *self, PyObject *msg) {
|
||||
Py_ssize_t sz;
|
||||
const char *bytes = PyUnicode_AsUTF8AndSize(msg, &sz);
|
||||
write_to_child(self, bytes, sz);
|
||||
CALLBACK("handle_remote_echo", "O", msg);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -875,6 +875,11 @@ class Window:
|
||||
def handle_remote_cmd(self, cmd: str) -> None:
|
||||
get_boss().handle_remote_cmd(cmd, self)
|
||||
|
||||
def handle_remote_echo(self, msg: bytes) -> None:
|
||||
from base64 import standard_b64decode
|
||||
data = standard_b64decode(msg)
|
||||
self.write_to_child(data)
|
||||
|
||||
def handle_remote_print(self, msg: bytes) -> None:
|
||||
text = process_remote_print(msg)
|
||||
print(text, end='', file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user