mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
encode/decode
This commit is contained in:
parent
be7f51cb94
commit
ec6bf0fd79
3 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ class PyData(IData):
|
||||||
return self.__time
|
return self.__time
|
||||||
|
|
||||||
def getLevel(self):
|
def getLevel(self):
|
||||||
return self.__level
|
return self.__level.decode('utf-8')
|
||||||
|
|
||||||
def getLocationName(self):
|
def getLocationName(self):
|
||||||
return self.__locationName
|
return self.__locationName
|
||||||
|
|
|
@ -60,6 +60,6 @@ class PyGeometryData(IGeometryData, PyData.PyData):
|
||||||
return unit.decode('utf-8')
|
return unit.decode('utf-8')
|
||||||
|
|
||||||
def getType(self, param):
|
def getType(self, param):
|
||||||
param = param
|
param = param.encode('utf-8')
|
||||||
type = self.__dataMap[param][1]
|
type = self.__dataMap[param][1]
|
||||||
return type
|
return type.decode('utf-8')
|
||||||
|
|
|
@ -163,7 +163,7 @@ class ThriftClientRouter(object):
|
||||||
locNamesRequest = GetAvailableLocationNamesRequest()
|
locNamesRequest = GetAvailableLocationNamesRequest()
|
||||||
locNamesRequest.setRequestParameters(request)
|
locNamesRequest.setRequestParameters(request)
|
||||||
response = self._client.sendRequest(locNamesRequest)
|
response = self._client.sendRequest(locNamesRequest)
|
||||||
return response
|
return [item.decode('utf8') for item in response]
|
||||||
|
|
||||||
def getAvailableParameters(self, request):
|
def getAvailableParameters(self, request):
|
||||||
paramReq = GetAvailableParametersRequest()
|
paramReq = GetAvailableParametersRequest()
|
||||||
|
|
Loading…
Add table
Reference in a new issue