Skip to content

Commit 6d82fce

Browse files
authored
Merge pull request #22 from JesseWeinstein/bytes_confusion
Remove misleading check
2 parents c16dbdb + 056e97d commit 6d82fce

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

multiaddr/codec.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@ def string_to_bytes(string):
4040
if len(sp) < 1:
4141
raise ValueError(
4242
"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)
43+
bs.append(address_string_to_bytes(proto, sp.pop(0)))
4944
return b''.join(bs)
5045

5146

0 commit comments

Comments
 (0)