Skip to content

Commit e3bced5

Browse files
committed
PartitionMetadata has .id, not .partition
1 parent b1ec10f commit e3bced5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

confluent_kafka/admin/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,17 +556,17 @@ class PartitionMetadata (object):
556556
of a broker id in the brokers dict.
557557
"""
558558
def __init__(self):
559-
self.partition = -1
559+
self.id = -1
560560
self.leader = -1
561561
self.replicas = []
562562
self.isrs = []
563563
self.error = None
564564

565565
def __repr__(self):
566566
if self.error is not None:
567-
return "PartitionMetadata({}, {})".format(self.partition, self.error)
567+
return "PartitionMetadata({}, {})".format(self.id, self.error)
568568
else:
569-
return "PartitionMetadata({})".format(self.partition)
569+
return "PartitionMetadata({})".format(self.id)
570570

571571
def __str__(self):
572-
return "{}".format(self.partition)
572+
return "{}".format(self.id)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy