Changed StringIO to BytesIO
* renamed stringio property to bufferedio in SegmentData
This commit is contained in:
parent
c30f390fed
commit
afc59593bd
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue