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

Commit

Permalink
fix broker version restriction on topic creation/deletion to match re…
Browse files Browse the repository at this point in the history
…ality
  • Loading branch information
emmettbutler committed May 7, 2018
1 parent 79a7c1c commit 7cf21a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pykafka/cli/kafka_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ def reset_offsets(client, args):


def create_topic(client, args):
if parse_version(args.broker_version) < parse_version('0.10.0'):
if parse_version(args.broker_version) < parse_version('0.10.1'):
raise ValueError("The topic creation API is not usable on brokers older than "
"0.10.0. Use --broker_version to specify the version")
"0.10.1. Use --broker_version to specify the version")
topic_req = CreateTopicRequest(args.topic, args.num_partitions,
args.replication_factor,
args.replica_assignment or [],
Expand All @@ -274,9 +274,9 @@ def create_topic(client, args):


def delete_topic(client, args):
if parse_version(args.broker_version) < parse_version('0.10.0'):
if parse_version(args.broker_version) < parse_version('0.10.1'):
raise ValueError("The topic deletion API is not usable on brokers older than "
"0.10.0. Use --broker_version to specify the version")
"0.10.1. Use --broker_version to specify the version")
client.cluster.controller_broker.delete_topics([args.topic], args.timeout)


Expand Down

0 comments on commit 7cf21a6

Please sign in to comment.