From 9e4cb4f06b2e362889bcbda77ef6fad52afed52b Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Wed, 19 Apr 2023 14:43:30 -0400 Subject: azure/errors: treat traceback_base64 as string (#2131) Save a few characters by decoding it as utf-8 string rather than using the bytes representation. Signed-off-by: Chris Patterson --- cloudinit/sources/azure/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit') diff --git a/cloudinit/sources/azure/errors.py b/cloudinit/sources/azure/errors.py index 0dd426a7..1a452635 100644 --- a/cloudinit/sources/azure/errors.py +++ b/cloudinit/sources/azure/errors.py @@ -87,7 +87,7 @@ class ReportableErrorUnhandledException(ReportableError): type(exception), exception, exception.__traceback__ ) ) - trace_base64 = base64.b64encode(trace.encode("utf-8")) + trace_base64 = base64.b64encode(trace.encode("utf-8")).decode("utf-8") self.supporting_data["exception"] = repr(exception) self.supporting_data["traceback_base64"] = trace_base64 -- cgit v1.2.1