summaryrefslogtreecommitdiff
path: root/kafka
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2014-08-25 10:15:16 -0700
committerDana Powers <dana.powers@rd.io>2014-08-25 12:54:54 -0700
commite151529078d53deca6254dee5b80e41e01226a7f (patch)
tree488ff0fb3a2ed26f52aa9f4b471ff3ff7060a938 /kafka
parentd73d1690b16ea86a9fd51056f4d149f54a4dd8f0 (diff)
downloadkafka-python-e151529078d53deca6254dee5b80e41e01226a7f.tar.gz
Add pylint to tox.ini; test both kafka and test; default to error-checking only; fixup errors; skip kafka/queue.py
Diffstat (limited to 'kafka')
-rw-r--r--kafka/client.py2
-rw-r--r--kafka/conn.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/kafka/client.py b/kafka/client.py
index 9474091..8630f66 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -187,7 +187,7 @@ class KafkaClient(object):
def _raise_on_response_error(self, resp):
try:
kafka.common.check_error(resp)
- except (UnknownTopicOrPartitionError, NotLeaderForPartitionError) as e:
+ except (UnknownTopicOrPartitionError, NotLeaderForPartitionError):
self.reset_topic_metadata(resp.topic)
raise
diff --git a/kafka/conn.py b/kafka/conn.py
index 0d17cb8..a1b0a80 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -93,8 +93,8 @@ class KafkaConnection(local):
# that the socket is in error. we will never get
# more data from this socket
if data == '':
- raise socket.error('Not enough data to read message -- did server kill socket?')
-
+ raise socket.error("Not enough data to read message -- did server kill socket?")
+
except socket.error:
log.exception('Unable to receive data from Kafka')
self._raise_connection_error()
@@ -170,7 +170,7 @@ class KafkaConnection(local):
except socket.error:
pass
- # Closing the socket should always succeed
+ # Closing the socket should always succeed
self._sock.close()
self._sock = None
else: