From afc59593bdf7b204f0b76cc4d1c08773fb9ad9ff Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Sun, 7 May 2017 21:08:29 -0700 Subject: [PATCH] Changed StringIO to BytesIO * renamed stringio property to bufferedio in SegmentData --- atrcopy/mame.py | 2 +- atrcopy/segments.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atrcopy/mame.py b/atrcopy/mame.py index 12320f5..7d813f2 100644 --- a/atrcopy/mame.py +++ b/atrcopy/mame.py @@ -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) diff --git a/atrcopy/segments.py b/atrcopy/segments.py index 21642ff..fdd7e5b 100644 --- a/atrcopy/segments.py +++ b/atrcopy/segments.py @@ -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