From 0ca8b2ea2d0f8a4fb9e800eaa097773792591c93 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sat, 2 Sep 2017 00:00:27 +0200 Subject: [PATCH] Ensure hexstr helper actually received a list of bytes Otherwise, the formatted output is rather bogus. Found with a test case. --- stcgal/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stcgal/utils.py b/stcgal/utils.py index bd28994..3204a30 100644 --- a/stcgal/utils.py +++ b/stcgal/utils.py @@ -53,7 +53,7 @@ class Utils: def hexstr(cls, bytestr, sep=""): """make formatted hex string output from byte sequence""" - return sep.join(["%02X" % x for x in bytestr]) + return sep.join(["%02X" % x for x in bytes(bytestr)]) class BaudType: