mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Convert various string literals to bytes.
This commit is contained in:
parent
c4140a158e
commit
da3f228740
3 changed files with 6 additions and 6 deletions
|
|
@ -31,13 +31,13 @@ class NoEOFStringIO(io.BytesIO):
|
|||
"""
|
||||
def read(self, n=-1):
|
||||
data = io.BytesIO.read(self, n)
|
||||
if data == '':
|
||||
if data == b'':
|
||||
raise AssertionError('caller tried to read past EOF')
|
||||
return data
|
||||
|
||||
def readline(self, length=None):
|
||||
data = io.BytesIO.readline(self, length)
|
||||
if data == '':
|
||||
if data == b'':
|
||||
raise AssertionError('caller tried to read past EOF')
|
||||
return data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue