commit | 12a439f1ec52a608a63c00a1ea439457f744e2cc | [log] [tgz] |
---|---|---|
author | Chris Liechti <cliechti@gmx.net> | Thu Aug 20 23:01:53 2015 +0200 |
committer | Chris Liechti <cliechti@gmx.net> | Thu Aug 20 23:01:53 2015 +0200 |
tree | 528c65c93c29ad97f65b363eca14b4094086f3fc | |
parent | 9dcb423f4892bf9db0ddb85b5e06297638876670 [diff] [blame] |
spy: fix hexdump layout and some bugs
diff --git a/serial/serialutil.py b/serial/serialutil.py index 63f8a93..9bd223f 100644 --- a/serial/serialutil.py +++ b/serial/serialutil.py
@@ -25,6 +25,8 @@ # "for byte in data" fails for python3 as it returns ints instead of bytes def iterbytes(b): """Iterate over bytes, returning bytes instead of ints (python3)""" + if isinstance(b, memoryview): + b = b.tobytes() x = 0 while True: a = b[x:x+1]