mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
Revert "fix getAttribute(s) encoding/decoding, move to PyData"
This reverts commit e133129843
.
This commit is contained in:
parent
675894876c
commit
3c580ed1fc
2 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue