tbird20d / grabserial

Grabserial - python-based serial dump and timing program - good for embedded Linux development
GNU General Public License v2.0
198 stars 79 forks source link

python3: do not open outfile in binary mode #20

Closed henning-schild closed 6 years ago

henning-schild commented 6 years ago

If outfile is opened in binary mode a write can not write "str" but is expected to write "bytes", but we are are writing "str" to it.

Tested with python2 and python3.

python3 output before the patch: [21:01:35.184141 0.000001] Traceback (most recent call last): File "./grabserial", line 530, in grab(sys.argv[1:]) File "./grabserial", line 470, in grab out.write(msg) TypeError: a bytes-like object is required, not 'str'

Signed-off-by: Henning Schild henning@hennsch.de

henning-schild commented 6 years ago

Sweet, i hope that is it for python3.

@ikv

tbird20d commented 6 years ago

Thanks for the fix.  I hope so. -- Tim

On Tuesday, March 6, 2018, 12:35:43 PM PST, Henning Schild <notifications@github.com> wrote:  

Sweet, i hope that is it for python3.

@ikv

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub, or mute the thread.