summaryrefslogtreecommitdiff
path: root/kafka/client.py
diff options
context:
space:
mode:
authorMark Roberts <markroberts@kixeye.com>2014-02-25 01:06:17 -0800
committerMark Roberts <markroberts@kixeye.com>2014-02-25 11:26:06 -0800
commit9732ed1670ef0739956900df37c0c77699628ec7 (patch)
tree641572cdbd91dcaf60cd42723b46bb2c6f626d32 /kafka/client.py
parentee7e86ea712de0a0390e64752c5cf9180c1681b5 (diff)
downloadkafka-python-9732ed1670ef0739956900df37c0c77699628ec7.tar.gz
Minor refactor in conn.py, update version in __init__.py, add ErrorString
Diffstat (limited to 'kafka/client.py')
-rw-r--r--kafka/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/client.py b/kafka/client.py
index 155f658..9578ee8 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -5,7 +5,7 @@ from collections import defaultdict
from functools import partial
from itertools import count
-from kafka.common import (ErrorMapping, TopicAndPartition,
+from kafka.common import (ErrorMapping, ErrorStrings, TopicAndPartition,
ConnectionError, FailedPayloadsError,
BrokerResponseError, PartitionUnavailableError,
KafkaUnavailableError, KafkaRequestError)
@@ -174,8 +174,8 @@ class KafkaClient(object):
self.reset_topic_metadata(resp.topic)
raise BrokerResponseError(
- "Request for %s failed with errorcode=%d" %
- (TopicAndPartition(resp.topic, resp.partition), resp.error))
+ "Request for %s failed with errorcode=%d (%s)" %
+ (TopicAndPartition(resp.topic, resp.partition), resp.error, ErrorStrings[resp.error]))
#################
# Public API #