Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dietlibc headers and all that jazz #1733

Merged
merged 14 commits into from
May 7, 2021
Prev Previous commit
Next Next commit
Workaround for py2
  • Loading branch information
Arusekk committed Apr 9, 2021
commit ea34e45bbd4b2196dff01ecd6b083854405d53d6
7 changes: 6 additions & 1 deletion pwnlib/constants/constant.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
class Constant(int):
try:
base = long # workaround for py2
except NameError:
base = int

class Constant(base):
def __new__(cls, s, i):
obj = super(Constant, cls).__new__(cls, i)
obj.s = s
Expand Down