Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 623d372

Browse files
committed
Don't ascii encode eol_convention. Was causing file write to fail.
1 parent 234a34a commit 623d372

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

Lib/idlelib/IOBinding.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ def loadfile(self, filename):
249249
firsteol = self.eol_re.search(chars)
250250
if firsteol:
251251
self.eol_convention = firsteol.group(0)
252-
if isinstance(self.eol_convention, str):
253-
# Make sure it is an ASCII string
254-
self.eol_convention = self.eol_convention.encode("ascii")
255252
chars = self.eol_re.sub(r"\n", chars)
256253
self.text.delete("1.0", "end")
257254
self.set_filename(None)

0 commit comments

Comments
 (0)