Convert various string literals to bytes.

This commit is contained in:
Jeremy Hylton 2007-08-29 17:26:34 +00:00
parent c4140a158e
commit da3f228740
3 changed files with 6 additions and 6 deletions

View file

@ -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