diff --git a/awips/dataaccess/PyData.py b/awips/dataaccess/PyData.py index cd58f65..01e3150 100644 --- a/awips/dataaccess/PyData.py +++ b/awips/dataaccess/PyData.py @@ -25,10 +25,7 @@ class PyData(IData): self.__attributes = dataRecord.getAttributes() def getAttribute(self, key): - if six.PY2: - return self.__attributes[key] - value = self.__attributes[key.encode('utf-8')] - return value.decode('utf-8') + return self.__attributes[key] def getAttributes(self): return self.__attributes.keys() diff --git a/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/response/AbstractResponseData.py b/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/response/AbstractResponseData.py index 12c455d..2a79924 100644 --- a/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/response/AbstractResponseData.py +++ b/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/response/AbstractResponseData.py @@ -33,7 +33,10 @@ class AbstractResponseData(six.with_metaclass(abc.ABCMeta, object)): self.locationName = locationName def getAttributes(self): - return self.attributes + if six.PY2: + return self.attributes + else: + return [item.decode('utf-8') for item in self.attributes] def setAttributes(self, attributes): self.attributes = attributes