BigEd / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
1 stars 3 forks source link

Fix ipm to allow traceback printout on platform with SerialConnection #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ipm> a = 4
ipm> a/0
Traceback (most recent call last):
  File "../../tools/ipm.py", line 416, in <module>
    main()
  File "../../tools/ipm.py", line 381, in main
    i.run()
  File "../../tools/ipm.py", line 326, in run
    self.cmdloop()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "../../tools/ipm.py", line 304, in onecmd
    rv = self.conn.read()
  File "../../tools/ipm.py", line 177, in read
    b.append(c)
ValueError: string must be of size 1

Original issue reported on code.google.com by dwhall...@gmail.com on 3 Oct 2010 at 2:29

GoogleCodeExporter commented 9 years ago
Actually the problem is when src/tools/ipm.py connects via a SerialConnection.

Original comment by dwhall...@gmail.com on 4 Oct 2010 at 10:33

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 4 Oct 2010 at 10:33

GoogleCodeExporter commented 9 years ago
r632

- Added check for zero-len return from serial connection's .read(1) method.

Tested via ipm on arduino_mega and mbed plats.
Checked in on branch for release 09.

Original comment by dwhall...@gmail.com on 5 Oct 2010 at 1:33