]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't ascii encode eol_convention. Was causing file write to fail.
authorKurt B. Kaiser <kbk@shore.net>
Thu, 30 Aug 2007 21:00:19 +0000 (21:00 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Thu, 30 Aug 2007 21:00:19 +0000 (21:00 +0000)
Lib/idlelib/IOBinding.py

index dd51062a1f8cbefd58535766b484af30c8119cb4..e1ca20d90e1e383f7e3c05c1d1761a01ec96a81b 100644 (file)
@@ -249,9 +249,6 @@ class IOBinding:
         firsteol = self.eol_re.search(chars)
         if firsteol:
             self.eol_convention = firsteol.group(0)
-            if isinstance(self.eol_convention, str):
-                # Make sure it is an ASCII string
-                self.eol_convention = self.eol_convention.encode("ascii")
             chars = self.eol_re.sub(r"\n", chars)
         self.text.delete("1.0", "end")
         self.set_filename(None)