Changed StringIO to BytesIO

* renamed stringio property to bufferedio in SegmentData
This commit is contained in:
Rob McMullen 2017-05-07 21:08:29 -07:00
parent c30f390fed
commit afc59593bd
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ log = logging.getLogger(__name__)
class MameZipImage(DiskImageBase):
def __init__(self, rawdata, filename=""):
self.zipdata = rawdata
fh = self.zipdata.stringio
fh = self.zipdata.bufferedio
if zipfile.is_zipfile(fh):
with zipfile.ZipFile(fh) as zf:
self.check_zip_size(zf)

View File

@ -201,8 +201,8 @@ class SegmentData(object):
raise ValueError("The base SegmentData object should use the resize method to replace arrays")
@property
def stringio(self):
buf = io.StringIO(self.data[:])
def bufferedio(self):
buf = io.BytesIO(self.data[:])
return buf
@property