mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
cleanup PyGeometryData getString()
This commit is contained in:
parent
88cab9b135
commit
16f5198ae9
1 changed files with 4 additions and 5 deletions
|
@ -42,11 +42,10 @@ class PyGeometryData(IGeometryData, PyData.PyData):
|
|||
|
||||
def getString(self, param):
|
||||
if six.PY2:
|
||||
return self.__dataMap[param][0]
|
||||
value = self.__dataMap[param.encode('utf-8')][0]
|
||||
if value is not None:
|
||||
return value.decode('utf-8')
|
||||
return value
|
||||
return str(self.__dataMap[param][0])
|
||||
else:
|
||||
value = self.__dataMap[param.encode('utf-8')][0]
|
||||
return str(value.decode('utf-8'))
|
||||
|
||||
def getNumber(self, param):
|
||||
t = self.getType(param)
|
||||
|
|
Loading…
Add table
Reference in a new issue