From 310e32ec09a3d5b32fcfaa02772a86b2f841a4c2 Mon Sep 17 00:00:00 2001 From: 0x79h Date: Fri, 8 Dec 2023 11:08:43 +0800 Subject: [PATCH] fix: fixing AttributeError in IDAPython --- qiling/os/os.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qiling/os/os.py b/qiling/os/os.py index 7982fe946..3351039a6 100644 --- a/qiling/os/os.py +++ b/qiling/os/os.py @@ -60,8 +60,9 @@ def __init__(self, ql: Qiling, resolvers: Mapping[Any, Resolver] = {}): # for the standard streams which usually do not support certain operations, # such as fileno(). here we use this to determine how we are going to use # the environment standard streams + assert sts.stdin != None # IDAPython don't have corresponding fds sys.stdin.fileno() - except UnsupportedOperation: + except (UnsupportedOperation, AssertionError): # Qiling is used on an interactive shell or embedded python interpreter. # if the internal stream buffer is accessible, we should use it self._stdin = getattr(sys.stdin, 'buffer', sys.stdin)