From 11cf3973bfc64ab0b4e471fc56dae911df1ec8d9 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Thu, 10 May 2018 16:12:19 -0700 Subject: Stop shadowing `ConnectionError` In Python3, `ConnectionError` is a native exception. So rename our custom one to `KafkaConnectionError` to prevent accidentally shadowing the native one. Note that there are still valid uses of `ConnectionError` in this code. They already expect a native Python3 `ConnectionError`, and also already handle the Python2 compatibility issues. --- kafka/client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kafka/client_async.py') diff --git a/kafka/client_async.py b/kafka/client_async.py index 9556eca..a9704fa 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -602,7 +602,7 @@ class KafkaClient(object): log.warning('Protocol out of sync on %r, closing', conn) except socket.error: pass - conn.close(Errors.ConnectionError('Socket EVENT_READ without in-flight-requests')) + conn.close(Errors.KafkaConnectionError('Socket EVENT_READ without in-flight-requests')) continue self._idle_expiry_manager.update(conn.node_id) -- cgit v1.2.1