mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
more six python version control for encodings
This commit is contained in:
parent
e332f3184a
commit
60e470c02c
2 changed files with 8 additions and 2 deletions
|
@ -50,7 +50,10 @@ class PyGeometryData(IGeometryData, PyData.PyData):
|
||||||
|
|
||||||
def getNumber(self, param):
|
def getNumber(self, param):
|
||||||
t = self.getType(param)
|
t = self.getType(param)
|
||||||
value = self.__dataMap[param.encode('utf-8')][0]
|
if six.PY2:
|
||||||
|
value = self.__dataMap[param][0]
|
||||||
|
else:
|
||||||
|
value = self.__dataMap[param.encode('utf-8')][0]
|
||||||
if t == 'INT' or t == 'SHORT' or t == 'LONG':
|
if t == 'INT' or t == 'SHORT' or t == 'LONG':
|
||||||
return int(value)
|
return int(value)
|
||||||
elif t == 'FLOAT':
|
elif t == 'FLOAT':
|
||||||
|
|
|
@ -124,7 +124,10 @@ class ThriftClientRouter(object):
|
||||||
for gridDataRecord in response.getGridData():
|
for gridDataRecord in response.getGridData():
|
||||||
locationName = gridDataRecord.getLocationName()
|
locationName = gridDataRecord.getLocationName()
|
||||||
if locationName is not None:
|
if locationName is not None:
|
||||||
locData = locSpecificData[locationName.encode('utf-8')]
|
if six.PY2:
|
||||||
|
locData = locSpecificData[locationName]
|
||||||
|
else:
|
||||||
|
locData = locSpecificData[locationName.encode('utf-8')]
|
||||||
else:
|
else:
|
||||||
locData = locSpecificData[locationName]
|
locData = locSpecificData[locationName]
|
||||||
if self._lazyLoadGridLatLon:
|
if self._lazyLoadGridLatLon:
|
||||||
|
|
Loading…
Add table
Reference in a new issue