Fix for typeerror #21 -- though this also points out re-reading what MMR2 points to (for logging) might be a bad idea

This commit is contained in:
Neil Webber 2024-05-08 08:40:13 -05:00
parent 9442b70617
commit 53d7c5d7ab

View file

@ -1043,7 +1043,13 @@ class PDP1170(PDP11):
# everything into an octal string.
if fmt is oct:
for k, v in d.items():
try:
pfx = '0' if v > 7 else ''
except TypeError:
# Leave non-numeric values unmolested.
# E.g., the "except PDPTrap" case for MMR2 reads
pass
else:
d[k] = pfx + oct(v)[2:]
return d