summaryrefslogtreecommitdiff
path: root/kafka/coordinator/consumer.py
diff options
context:
space:
mode:
authorJeff Widman <jeff@jeffwidman.com>2018-11-13 11:57:45 -0800
committerJeff Widman <jeff@jeffwidman.com>2018-11-18 00:21:18 -0800
commit1d443638e22c2d360086b8d7cee8b5d930741d12 (patch)
tree9e60f53f4a791b306acd6f1a2223557ead1ed750 /kafka/coordinator/consumer.py
parentf3105a434f3bd2fb3f8899e4861e187e786b03da (diff)
downloadkafka-python-1d443638e22c2d360086b8d7cee8b5d930741d12.tar.gz
Be explicit with tuples for %s formatting
Fix #1633
Diffstat (limited to 'kafka/coordinator/consumer.py')
-rw-r--r--kafka/coordinator/consumer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py
index 647a6b5..14eee0f 100644
--- a/kafka/coordinator/consumer.py
+++ b/kafka/coordinator/consumer.py
@@ -216,7 +216,7 @@ class ConsumerCoordinator(BaseCoordinator):
self._assignment_snapshot = None
assignor = self._lookup_assignor(protocol)
- assert assignor, 'Coordinator selected invalid assignment protocol: %s' % protocol
+ assert assignor, 'Coordinator selected invalid assignment protocol: %s' % (protocol,)
assignment = ConsumerProtocol.ASSIGNMENT.decode(member_assignment_bytes)
@@ -297,7 +297,7 @@ class ConsumerCoordinator(BaseCoordinator):
def _perform_assignment(self, leader_id, assignment_strategy, members):
assignor = self._lookup_assignor(assignment_strategy)
- assert assignor, 'Invalid assignment protocol: %s' % assignment_strategy
+ assert assignor, 'Invalid assignment protocol: %s' % (assignment_strategy,)
member_metadata = {}
all_subscribed_topics = set()
for member_id, metadata_bytes in members:
@@ -804,7 +804,7 @@ class ConsumerCoordinator(BaseCoordinator):
class ConsumerCoordinatorMetrics(object):
def __init__(self, metrics, metric_group_prefix, subscription):
self.metrics = metrics
- self.metric_group_name = '%s-coordinator-metrics' % metric_group_prefix
+ self.metric_group_name = '%s-coordinator-metrics' % (metric_group_prefix,)
self.commit_latency = metrics.sensor('commit-latency')
self.commit_latency.add(metrics.metric_name(