Fix IndexError in python interpreter

This commit is contained in:
oxygen311 2018-08-06 16:48:08 +03:00
parent cbf2228483
commit 5d0fdd296a

View file

@ -145,7 +145,7 @@ while True :
if (nhooks > 0):
to_run_hooks = code.body[-nhooks:]
to_run_exec, to_run_single = (code.body[:-(nhooks + 1)],
[code.body[-(nhooks + 1)]])
[code.body[-(nhooks + 1)]] if len(code.body) > nhooks else [])
try:
for node in to_run_exec:
mod = ast.Module([node])