Skip to content

Commit c80fbd1

Browse files
author
Dana Powers
committed
KafkaClient.get_partition_ids_for_topic now returns empty list for unknown topics
1 parent 83d28ba commit c80fbd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def has_metadata_for_topic(self, topic):
265265

266266
def get_partition_ids_for_topic(self, topic):
267267
if topic not in self.topic_partitions:
268-
return None
268+
return []
269269

270270
return sorted(list(self.topic_partitions[topic]))
271271

0 commit comments

Comments
 (0)