diff --git a/src/rpcclient/rpcclient/client.py b/src/rpcclient/rpcclient/client.py index ae21fda1..5f0c9e07 100644 --- a/src/rpcclient/rpcclient/client.py +++ b/src/rpcclient/rpcclient/client.py @@ -10,11 +10,11 @@ from collections import namedtuple from enum import Enum from pathlib import Path +from select import select import IPython import xonsh from construct import Int64sl, Float64l, Float32l, Float16l, Int64ul -from select import select from traitlets.config import Config from xonsh.built_ins import XSH @@ -611,7 +611,8 @@ def _execution_loop(self, stdin: io_or_str = sys.stdin, stdout=sys.stdout): stdout.write(data.decode()) stdout.flush() elif exec_chunk.chunk_type == exec_chunk_type_t.CMD_EXEC_CHUNK_TYPE_ERRORCODE: - return exitcode_t.parse(data) + # WEXITSTATUS(x) + return exitcode_t.parse(data) >> 8 def raise_errno_exception(self, message: str): message += f' ({self.last_error})'