From 30d34c25273cf9a12623a9a0a7849151b2cd1fdd Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 20 Mar 2015 17:08:53 -0400 Subject: [PATCH] Fix Unicode error on confetty pipe out When unicode was encountered, it would through an *encode* error. Fix that issue. --- confluent_client/bin/confetty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index 76068cdb..7815d250 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -271,7 +271,7 @@ def print_result(res): output = attrstr try: print(output) - except UnicodeDecodeError: + except (UnicodeDecodeError, UnicodeEncodeError): print(output.encode('utf-8'))