Skip to content

Commit

Permalink
python 3 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mildsunrise authored Jul 15, 2020
1 parent 117fd01 commit c5ba0fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,8 @@ def parse_enum(self, x, type):
def parse_dump(self, file, type):
chunk = file.read()
filename = self.dump_prefix + str(self.dump_index)
file = open(filename, "w")
file.write(chunk)
file.close()
with open(filename, "wb") as f:
f.write(chunk)
self.dump_index += 1
return "%d bytes written to %s" % (len(chunk), filename)

Expand Down

0 comments on commit c5ba0fa

Please sign in to comment.