From b8c4156eb2124aff99fce957525fb197ffff535a Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Wed, 2 Sep 2020 10:52:01 -0400 Subject: [PATCH] start fixing binary data --HG-- branch : pmacs2 --- buffer/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffer/__init__.py b/buffer/__init__.py index 1094121..52e0349 100644 --- a/buffer/__init__.py +++ b/buffer/__init__.py @@ -784,7 +784,7 @@ class Binary32Buffer(FileBuffer): while j < self.numgroups * self.groupsize and i + j < len(data): bytes = [] for c in data[i + j:i + j + self.groupsize]: - bytes.append(string.hexdigits[ord(c) / 16] + string.hexdigits[ord(c) % 16]) + bytes.append(string.hexdigits[c // 16] + string.hexdigits[c % 16]) groups.append(bytepad.join(bytes)) j += self.groupsize lines.append(grouppad.join(groups))