diff options
author | Chris Liechti <cliechti@gmx.net> | 2015-08-20 23:01:53 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2015-08-20 23:01:53 +0200 |
commit | 12a439f1ec52a608a63c00a1ea439457f744e2cc (patch) | |
tree | 528c65c93c29ad97f65b363eca14b4094086f3fc /serial/serialutil.py | |
parent | 9dcb423f4892bf9db0ddb85b5e06297638876670 (diff) | |
download | pyserial-git-12a439f1ec52a608a63c00a1ea439457f744e2cc.tar.gz |
spy: fix hexdump layout and some bugs
Diffstat (limited to 'serial/serialutil.py')
-rw-r--r-- | serial/serialutil.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ except (NameError, AttributeError): # "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] |