From 7d8f9a41e0b7a83624e6ebab368de68b87f71997 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Thu, 8 Feb 2018 12:24:55 -0800 Subject: [PATCH] Use raw in case string overriden (#1373) --- kafka/protocol/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kafka/protocol/types.py b/kafka/protocol/types.py index d5e446a10..87b810c57 100644 --- a/kafka/protocol/types.py +++ b/kafka/protocol/types.py @@ -10,7 +10,7 @@ def _pack(f, value): return pack(f, value) except error as e: raise ValueError("Error encountered when attempting to convert value: " - "{} to struct format: '{}', hit error: {}" + "{!r} to struct format: '{}', hit error: {}" .format(value, f, e)) @@ -20,7 +20,7 @@ def _unpack(f, data): return value except error as e: raise ValueError("Error encountered when attempting to convert value: " - "{} to struct format: '{}', hit error: {}" + "{!r} to struct format: '{}', hit error: {}" .format(value, f, e))