Skip to content

Commit

Permalink
πŸ› Use bytes instead of text
Browse files Browse the repository at this point in the history
  • Loading branch information
kierandrewett committed Mar 18, 2021
1 parent a085dc6 commit e7bf997
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/ci-fix-le.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
for patch in os.listdir(os.path.join(os.getcwd(), "patches")):
path = os.path.join(os.getcwd(), "patches", patch)

fin = open(path, "rt")
data = fin.read()
data = data.replace(b"\r\n",b"\n")
fin = open(path, "rb")
data = data.read().replace(b"\r\n",b"\n")
fin.close()

fin = open(path, "wt")
fin = open(path, "wb")
fin.write(data)
fin.close()

Expand Down

0 comments on commit e7bf997

Please sign in to comment.