Skip to content

Commit ff56bdb

Browse files
authored
Args are optional in BrokerResponseError str (dpkp#889)
1 parent 6c9f728 commit ff56bdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kafka/errors.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ class BrokerResponseError(KafkaError):
7373

7474
def __str__(self):
7575
"""Add errno to standard KafkaError str"""
76-
return '[Error {0}] {1}: {2}'.format(
76+
return '[Error {0}] {1}'.format(
7777
self.errno,
78-
self.__class__.__name__,
79-
super(KafkaError, self).__str__()) # pylint: disable=bad-super-call
78+
super(BrokerResponseError, self).__str__())
8079

8180

8281
class NoError(BrokerResponseError):
@@ -154,6 +153,7 @@ class BrokerNotAvailableError(BrokerResponseError):
154153
description = ('This is not a client facing error and is used mostly by'
155154
' tools when a broker is not alive.')
156155

156+
157157
class ReplicaNotAvailableError(BrokerResponseError):
158158
errno = 9
159159
message = 'REPLICA_NOT_AVAILABLE'

0 commit comments

Comments
 (0)