mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.9] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) (GH-23071)
[[bpo-29566]()]() notes that binhex.binhex uses inconsistent line endings (both Unix and MacOS9 line endings are used). This PR changes this to use the MacOS9 line endings everywhere.
(cherry picked from commit 2165cea548
)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Automerge-Triggered-By: GH:ronaldoussoren
This commit is contained in:
parent
cfcb952e30
commit
3defcbac2c
3 changed files with 15 additions and 2 deletions
|
@ -117,12 +117,12 @@ class _Hqxcoderengine:
|
|||
first = 0
|
||||
while first <= len(self.hqxdata) - self.linelen:
|
||||
last = first + self.linelen
|
||||
self.ofp.write(self.hqxdata[first:last] + b'\n')
|
||||
self.ofp.write(self.hqxdata[first:last] + b'\r')
|
||||
self.linelen = LINELEN
|
||||
first = last
|
||||
self.hqxdata = self.hqxdata[first:]
|
||||
if force:
|
||||
self.ofp.write(self.hqxdata + b':\n')
|
||||
self.ofp.write(self.hqxdata + b':\r')
|
||||
|
||||
def close(self):
|
||||
if self.data:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue