Commit 22a3f3d3 authored by Michael Büsch's avatar Michael Büsch

Return None, if bytes is None in bytesToHexStr

Signed-off-by: Michael Büsch's avatarMichael Buesch <>
parent de93e83f
......@@ -65,7 +65,7 @@ class BlockInfo(object):
return not self.__eq__(other)
def __repr__(self):
return "BlockInfo(%d, %d, %s)" % (
return "BlockInfo(%d, %d, '%s')" % (
......@@ -210,4 +210,6 @@ def base64ToStr(b64String, ignoreErrors=False):
def bytesToHexStr(_bytes):
"""Convert bytes to a hex-string.
if _bytes is None:
return None
return binascii.b2a_hex(_bytes).decode("ascii")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment