Skip to content

Commit 535d231

Browse files
Wojciech ZabołotnyWojciech Zabołotny
authored andcommitted
Modification needed to run the bootstrap in swapforth/j1b/verilator with new version of Python 3.
Without that, an error occurs: Traceback (most recent call last): File "/tmp/swapforth/j1b/verilator/shell.py", line 53, in <module> swapforth.main(TetheredJ1b) File "../../shell/swapforth.py", line 385, in main r.shell() File "../../shell/swapforth.py", line 339, in shell self.shellcmd(cmd) File "../../shell/swapforth.py", line 197, in shellcmd d = self.serialize() File "/tmp/rr/swapforth/j1b/verilator/shell.py", line 49, in serialize s = array.array('B', s).tostring().ljust(32768, chr(0xff)) AttributeError: 'array.array' object has no attribute 'tostring'
1 parent 06c38c5 commit 535d231

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

j1b/verilator/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def serialize(self):
4646
for l in lines:
4747
l = l.split()
4848
s += [int(b, 16) for b in l[1:17]]
49-
s = array.array('B', s).tostring().ljust(32768, chr(0xff))
49+
s = array.array('B', s).tobytes().ljust(32768, bytearray((0xff,)))
5050
return array.array('i', s)
5151

5252
if __name__ == '__main__':

0 commit comments

Comments
 (0)