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