summaryrefslogtreecommitdiff
path: root/kafka/client.py
diff options
context:
space:
mode:
authorOmar Ghishan <omar.ghishan@rd.io>2014-01-08 11:30:15 -0800
committerOmar Ghishan <omar.ghishan@rd.io>2014-01-08 11:30:15 -0800
commit317c8480164763b484fa82d0e0273107bc861538 (patch)
tree8f38432768a297b72177f31ee8c08f1b2d5979e8 /kafka/client.py
parent9cbe45d2358d563bb2844eecaa545e7f6d0a6629 (diff)
downloadkafka-python-317c8480164763b484fa82d0e0273107bc861538.tar.gz
Change BufferUnderflowError to ConnectionError in conn._read_bytes()
Both errors are handled the same way when raised and caught, so this makes sense.
Diffstat (limited to 'kafka/client.py')
-rw-r--r--kafka/client.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/kafka/client.py b/kafka/client.py
index 821904c..33c6d77 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -3,11 +3,10 @@ from collections import defaultdict
from functools import partial
from itertools import count
import logging
-import socket
import time
from kafka.common import (
- ErrorMapping, TopicAndPartition, BufferUnderflowError, ConnectionError,
+ ErrorMapping, TopicAndPartition, ConnectionError,
FailedPayloadsException
)
from kafka.conn import KafkaConnection
@@ -175,7 +174,7 @@ class KafkaClient(object):
continue
try:
response = conn.recv(requestId)
- except (ConnectionError, BufferUnderflowError), e:
+ except ConnectionError, e:
log.warning("Could not receive response to request [%s] "
"from server %s: %s", request, conn, e)
failed = True