diff options
author | Chris Patterson <cpatterson@microsoft.com> | 2023-04-19 14:43:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 12:43:30 -0600 |
commit | 9e4cb4f06b2e362889bcbda77ef6fad52afed52b (patch) | |
tree | 20dd9c79fc80a42f2742229fa722271c5ae46f3c /cloudinit | |
parent | d6de22e31c3223a2c46f175e71d3dd3a53611842 (diff) | |
download | cloud-init-git-9e4cb4f06b2e362889bcbda77ef6fad52afed52b.tar.gz |
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 <cpatterson@microsoft.com>
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/sources/azure/errors.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |