summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Widman <jeff@jeffwidman.com>2018-12-13 02:35:00 -0800
committerGitHub <noreply@github.com>2018-12-13 02:35:00 -0800
commit7aa997f7205c116582b3d5f354cff3c7eac89ad2 (patch)
tree7450c55c9f5becefd56a16c836820cb12f291dd4
parentc6d8a536eff6e5ce205badc38b841d3bc27f40f6 (diff)
downloadkafka-python-7aa997f7205c116582b3d5f354cff3c7eac89ad2.tar.gz
Bugfix: Types need identity comparison
`isinstance()` won't work here, as the types require identity comparison.
-rw-r--r--kafka/admin/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kafka/admin/client.py b/kafka/admin/client.py
index e25afe7..4c780fb 100644
--- a/kafka/admin/client.py
+++ b/kafka/admin/client.py
@@ -334,7 +334,7 @@ class KafkaAdminClient(object):
# DeleteTopicsResponse returns topic_error_codes rather than topic_errors
for topic, error_code in getattr(response, "topic_errors", response.topic_error_codes):
error_type = Errors.for_code(error_code)
- if tries and isinstance(error_type, NotControllerError):
+ if tries and error_type is NotControllerError:
# No need to inspect the rest of the errors for
# non-retriable errors because NotControllerError should
# either be thrown for all errors or no errors.