2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-25 12:41:39 +00:00

Fix Unicode error on confetty pipe out

When unicode was encountered, it would through an *encode* error.
Fix that issue.
This commit is contained in:
Jarrod Johnson 2015-03-20 17:08:53 -04:00
parent a31834910c
commit 30d34c2527

View File

@ -271,7 +271,7 @@ def print_result(res):
output = attrstr
try:
print(output)
except UnicodeDecodeError:
except (UnicodeDecodeError, UnicodeEncodeError):
print(output.encode('utf-8'))