Skip to content

Commit

Permalink
Fix safeeval test on Python 3.12
Browse files Browse the repository at this point in the history
There is a 151 RESUME opcode in Python 3.12 now.
  • Loading branch information
peace-maker committed Oct 11, 2024
1 parent 35da2dc commit 4554aa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pwnlib/util/safeeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def _get_opcodes(codeobj):
Extract the actual opcodes as a list from a code object
>>> c = compile("[1 + 2, (1,2)]", "", "eval")
>>> _get_opcodes(c)
[100, 100, 103, 83]
>>> _get_opcodes(c) # doctest: +ELLIPSIS
[...100, 100, 103, 83]
"""
import dis
if hasattr(dis, 'get_instructions'):
Expand Down

0 comments on commit 4554aa4

Please sign in to comment.