Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #339 from Parsely/fix-print-topics
Browse files Browse the repository at this point in the history
Load all topic values on values method.
  • Loading branch information
emmettbutler committed Nov 10, 2015
2 parents 74a0422 + 0fdee90 commit da5cada
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pykafka/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def __init__(self, cluster, exclude_internal_topics, *args, **kwargs):
self._cluster = weakref.ref(cluster)
self._exclude_internal_topics = exclude_internal_topics

def values(self):
return [self[key] for key in self]

def __getitem__(self, key):
if self._should_exclude_topic(key):
raise KeyError("You have configured KafkaClient/Cluster to hide "
Expand Down

0 comments on commit da5cada

Please sign in to comment.