summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2016-11-18 10:15:39 -0800
committerGitHub <noreply@github.com>2016-11-18 10:15:39 -0800
commitff56bdbcc646044eca2b5020d3ca7e8c683d604a (patch)
tree86c2ce24fd4bcbe489dfdb22b60e5b73e221cd8f
parent6c9f7280c5adee9db0f2b766c54bd9e386a56f25 (diff)
downloadkafka-python-ff56bdbcc646044eca2b5020d3ca7e8c683d604a.tar.gz
Args are optional in BrokerResponseError str (#889)
-rw-r--r--kafka/errors.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/errors.py b/kafka/errors.py
index 069c9e4..97d9fb1 100644
--- a/kafka/errors.py
+++ b/kafka/errors.py
@@ -73,10 +73,9 @@ class BrokerResponseError(KafkaError):
def __str__(self):
"""Add errno to standard KafkaError str"""
- return '[Error {0}] {1}: {2}'.format(
+ return '[Error {0}] {1}'.format(
self.errno,
- self.__class__.__name__,
- super(KafkaError, self).__str__()) # pylint: disable=bad-super-call
+ super(BrokerResponseError, self).__str__())
class NoError(BrokerResponseError):
@@ -154,6 +153,7 @@ class BrokerNotAvailableError(BrokerResponseError):
description = ('This is not a client facing error and is used mostly by'
' tools when a broker is not alive.')
+
class ReplicaNotAvailableError(BrokerResponseError):
errno = 9
message = 'REPLICA_NOT_AVAILABLE'