Ensure hexstr helper actually received a list of bytes

Otherwise, the formatted output is rather bogus. Found with a test case.
This commit is contained in:
Grigori Goronzy 2017-09-02 00:00:27 +02:00
parent 53184b549e
commit 0ca8b2ea2d

View File

@ -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: