We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 869e1ab commit d39665fCopy full SHA for d39665f
1 file changed
cassandra/metadata.py
@@ -1519,10 +1519,8 @@ class BytesToken(Token):
1519
1520
def __init__(self, token_string):
1521
""" `token_string` should be string representing the token. """
1522
- if not isinstance(token_string, six.string_types):
1523
- raise TypeError(
1524
- "Tokens for ByteOrderedPartitioner should be strings (got %s)"
1525
- % (type(token_string),))
+ if isinstance(token_string, six.text_type):
+ token_string = token_string.encode('utf-8')
1526
self.value = token_string
1527
1528
0 commit comments