Skip to content

Commit 7cc63f2

Browse files
committed
fixup Errors.IncompatibleBrokerVersion raise
1 parent 2a3f8c1 commit 7cc63f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kafka/client_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,15 +1071,15 @@ def api_version(self, operation, max_version=None):
10711071
broker_api_versions = self._api_versions
10721072
api_key = operation[0].API_KEY
10731073
if broker_api_versions is None or api_key not in broker_api_versions:
1074-
raise IncompatibleBrokerVersion(
1074+
raise Errors.IncompatibleBrokerVersion(
10751075
"Kafka broker does not support the '{}' Kafka protocol."
10761076
.format(operation[0].__name__))
10771077
broker_min_version, broker_max_version = broker_api_versions[api_key]
10781078
version = min(max_version, broker_max_version)
10791079
if version < broker_min_version:
10801080
# max library version is less than min broker version. Currently,
10811081
# no Kafka versions specify a min msg version. Maybe in the future?
1082-
raise IncompatibleBrokerVersion(
1082+
raise Errors.IncompatibleBrokerVersion(
10831083
"No version of the '{}' Kafka protocol is supported by both the client and broker."
10841084
.format(operation[0].__name__))
10851085
return version

0 commit comments

Comments
 (0)