cleanup PyGeometryData getString()/2

This commit is contained in:
Michael James 2018-10-15 08:19:21 -06:00
parent 16f5198ae9
commit 68e36d400b

View file

@ -42,10 +42,13 @@ class PyGeometryData(IGeometryData, PyData.PyData):
def getString(self, param):
if six.PY2:
return str(self.__dataMap[param][0])
else:
value = self.__dataMap[param.encode('utf-8')][0]
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)