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

Remove long type #454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

codecs.register_error("backslashreplace_", codecs.lookup_error("backslashreplace"))

long = int


# lru_cache with a shallow copy of the objects returned (list, dicts, ..)
# we don't use deepcopy as it's _really_ slow and the data we retrieved using
Expand Down Expand Up @@ -1062,7 +1060,7 @@ def dump(self, indentation=0):
for keys in self.__keys__:
for key in keys:
val = getattr(self, key)
if isinstance(val, (int, long)):
if isinstance(val, int):
if key.startswith("Signature_"):
val_str = "{:<8X}".format(val)
else:
Expand Down Expand Up @@ -1112,7 +1110,7 @@ def dump_dict(self):
for keys in self.__keys__:
for key in keys:
val = getattr(self, key)
if isinstance(val, (int, long)):
if isinstance(val, int):
if key == "TimeDateStamp" or key == "dwTimeStamp":
try:
val = "0x%-8X [%s UTC]" % (
Expand Down
Loading