Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/erocarrera/pefile
Browse files Browse the repository at this point in the history
  • Loading branch information
erocarrera committed Aug 26, 2024
2 parents ee5a63c + de28d34 commit d05a038
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3521,10 +3521,8 @@ def write(self, filename=None):
if not filename:
return new_file_data

f = open(filename, "wb+")
f.write(new_file_data)
f.close()
return
with open(filename, "wb+") as f:
f.write(new_file_data)

def parse_sections(self, offset):
"""Fetch the PE file sections.
Expand Down

0 comments on commit d05a038

Please sign in to comment.