mirror of https://github.com/pwndbg/pwndbg.git
Fix big with enums OR operation in Python 3 (#222)
The bug can be reproduced using such code:
```
pwndbg> py import re; re.DOTALL | re.MULTILINE
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/enum.py", line 794, in __or__
result = self.__class__(self._value_ | self.__class__(other)._value_)
File "/usr/lib/python3.6/enum.py", line 291, in __call__
return cls.__new__(cls, value)
File "/usr/lib/python3.6/enum.py", line 533, in __new__
return cls._missing_(value)
File "/usr/lib/python3.6/enum.py", line 760, in _missing_
new_member = cls._create_pseudo_member_(value)
File "/usr/lib/python3.6/enum.py", line 786, in _create_pseudo_member_
pseudo_member._name_ = None
AttributeError: 'int' object has no attribute '_name_'
Error while executing Python code.
```
The fix seems to work with Python 2 as well:
http://asciinema.org/a/czopcwobjwt2dk9vzif0zk49u
pull/195/merge
parent
7ec861b110
commit
b565ff8fc0
Loading…
Reference in new issue