From a5f9692deb34a82a50fc03c1d4e0cbf2677e61b5 Mon Sep 17 00:00:00 2001 From: Michael James Date: Thu, 4 Oct 2018 11:25:14 -0600 Subject: [PATCH] account for bytestring in SerializableExceptionWrapper --- .../common/serialization/SerializableExceptionWrapper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dynamicserialize/dstypes/com/raytheon/uf/common/serialization/SerializableExceptionWrapper.py b/dynamicserialize/dstypes/com/raytheon/uf/common/serialization/SerializableExceptionWrapper.py index 0c71adb..8ae5157 100644 --- a/dynamicserialize/dstypes/com/raytheon/uf/common/serialization/SerializableExceptionWrapper.py +++ b/dynamicserialize/dstypes/com/raytheon/uf/common/serialization/SerializableExceptionWrapper.py @@ -23,13 +23,13 @@ class SerializableExceptionWrapper(object): def __repr__(self): if not self.message: self.message = '' - retVal = "" + self.exceptionClass + " exception thrown: " + self.message + "\n" + retVal = b"" + self.exceptionClass + b" exception thrown: " + self.message + b"\n" for element in self.stackTrace: - retVal += "\tat " + str(element) + "\n" + retVal += b"\tat " + str(element).encode('UTF-8') + b"\n" if self.wrapper: - retVal += "Caused by: " + self.wrapper.__repr__() - return retVal + retVal += b"Caused by: " + self.wrapper.__repr__().encode('UTF-8') + return str(retVal) def getStackTrace(self): return self.stackTrace