diff options
author | Dana Powers <dana.powers@gmail.com> | 2014-08-26 18:24:31 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2014-08-26 18:24:31 -0700 |
commit | d107420bedc5c4ebdd8f53fd39883b88b7789ed4 (patch) | |
tree | 7fb2d8ee46abdbcb282d87887e24c36febb766bb /kafka | |
parent | 695ea2227c735e788840ecbe66bd99243964ef76 (diff) | |
parent | e151529078d53deca6254dee5b80e41e01226a7f (diff) | |
download | kafka-python-d107420bedc5c4ebdd8f53fd39883b88b7789ed4.tar.gz |
Merge pull request #208 from dpkp/add_pylint_to_tox_ini
Use PyLint for static error checking
Diffstat (limited to 'kafka')
-rw-r--r-- | kafka/client.py | 2 | ||||
-rw-r--r-- | kafka/conn.py | 6 |
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: |