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