We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c16dbdb + 056e97d commit 6d82fceCopy full SHA for 6d82fce
multiaddr/codec.py
@@ -40,12 +40,7 @@ def string_to_bytes(string):
40
if len(sp) < 1:
41
raise ValueError(
42
"protocol requires address, none given: %s" % proto.name)
43
- addr_string = sp.pop(0)
44
- addr_bytes = address_string_to_bytes(proto, addr_string)
45
- if isinstance(addr_bytes, six.string_types):
46
- bs.append(six.b(addr_bytes))
47
- else:
48
- bs.append(addr_bytes)
+ bs.append(address_string_to_bytes(proto, sp.pop(0)))
49
return b''.join(bs)
50
51
0 commit comments