summaryrefslogtreecommitdiff
path: root/kafka/client.py
diff options
context:
space:
mode:
authorMark Roberts <wizzat@fb.com>2014-09-03 10:56:22 -0700
committerMark Roberts <wizzat@fb.com>2014-09-03 10:56:22 -0700
commite889c8aef01e9a0b0fc55c433314041ad3dccb2a (patch)
tree20f76d942e0885b03046d90f52c5bc2be9c06c7c /kafka/client.py
parent63350070350b0b41903ab78f41b388c518f9dad7 (diff)
downloadkafka-python-e889c8aef01e9a0b0fc55c433314041ad3dccb2a.tar.gz
Fix test errors related to mocks
Diffstat (limited to 'kafka/client.py')
-rw-r--r--kafka/client.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/kafka/client.py b/kafka/client.py
index 410573a..a918091 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -1,3 +1,4 @@
+import binascii
import collections
import copy
import functools
@@ -96,7 +97,7 @@ class KafkaClient(object):
return response
except Exception as e:
log.warning("Could not send request [%r] to server %s:%i, "
- "trying next server: %s" % (request, host, port, e))
+ "trying next server: %s" % (binascii.b2a_hex(request), host, port, e))
raise KafkaUnavailableError("All servers failed to process request")
@@ -160,11 +161,11 @@ class KafkaClient(object):
response = conn.recv(requestId)
except ConnectionError as e:
log.warning("Could not receive response to request [%s] "
- "from server %s: %s", request, conn, e)
+ "from server %s: %s", binascii.b2a_hex(request), conn, e)
failed = True
except ConnectionError as e:
log.warning("Could not send request [%s] to server %s: %s",
- request, conn, e)
+ binascii.b2a_hex(request), conn, e)
failed = True
if failed: