From 87dfd0b79f85b6186fe72ef9686f404df5713632 Mon Sep 17 00:00:00 2001 From: Parsiad Azimzadeh Date: Sat, 15 Apr 2023 13:43:38 -0400 Subject: [PATCH] Handle get_pty_slave failure gracefully --- rplugin/python3/magma/outputchunks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rplugin/python3/magma/outputchunks.py b/rplugin/python3/magma/outputchunks.py index de1a574..29a56a6 100644 --- a/rplugin/python3/magma/outputchunks.py +++ b/rplugin/python3/magma/outputchunks.py @@ -122,7 +122,8 @@ def _get_char_pixelsize(self) -> Optional[Tuple[int, int]]: return None pty = get_pty_slave(os.getppid()) - assert pty is not None + if pty is None: + return None with open(pty) as fd_pty: farg = struct.pack("HHHH", 0, 0, 0, 0)