diff options
author | Space <space@wibidata.com> | 2015-03-31 15:25:38 -0700 |
---|---|---|
committer | Space <space@wibidata.com> | 2015-04-03 10:23:39 -0700 |
commit | 1c856e8400e1c4fe6dccd562fbcf4d1bde38755d (patch) | |
tree | 69e8a5142d8946adddc44590612a9968540d801f /kafka/consumer/base.py | |
parent | 9fd08119170b64c56ea024d12ef6b0e6482d778b (diff) | |
download | kafka-python-1c856e8400e1c4fe6dccd562fbcf4d1bde38755d.tar.gz |
Make external API consistently support python3 strings for topic.
Diffstat (limited to 'kafka/consumer/base.py')
-rw-r--r-- | kafka/consumer/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/consumer/base.py b/kafka/consumer/base.py index 0bbf46c..2bd42eb 100644 --- a/kafka/consumer/base.py +++ b/kafka/consumer/base.py @@ -10,7 +10,7 @@ from kafka.common import ( UnknownTopicOrPartitionError, check_error ) -from kafka.util import ReentrantTimer +from kafka.util import kafka_bytestring, ReentrantTimer log = logging.getLogger("kafka") @@ -44,8 +44,8 @@ class Consumer(object): auto_commit_every_t=AUTO_COMMIT_INTERVAL): self.client = client - self.topic = topic - self.group = group + self.topic = kafka_bytestring(topic) + self.group = None if group is None else kafka_bytestring(group) self.client.load_metadata_for_topics(topic) self.offsets = {} |