Skip to content

Commit

Permalink
Added private method _send_messages that can accept kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
se7entyse7en committed Nov 26, 2014
1 parent 8138987 commit 7041a27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kafka/producer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ def send_messages(self, topic, partition, *msg):
All messages produced via this method will set the message 'key' to Null
"""
return self._send_messages(topic, partition, *msg)

def _send_messages(self, topic, partition, *msg, **kwargs):
# Guarantee that msg is actually a list or tuple (should always be true)
if not isinstance(msg, (list, tuple)):
raise TypeError("msg is not a list or tuple!")
Expand Down

0 comments on commit 7041a27

Please sign in to comment.