Commit e80ef8de authored by Daniel Scheffler's avatar Daniel Scheffler

Fixed TypeError within metadata module.

parent dd81ff3a
Pipeline #3157 passed with stages
in 1 minute and 27 seconds
......@@ -106,17 +106,17 @@ class GDAL_Metadata(object):
return param_value.strip()
def _convert_param_to_ENVI_str(self, param_value):
if isinstance(param_value, int):
if isinstance(param_value, (int, np.integer)):
return str(param_value)
elif isinstance(param_value, float):
elif isinstance(param_value, (float, np.floating)):
return '%f' % param_value
elif isinstance(param_value, list):
return '{ ' + ',\n'.join([self._convert_param_to_ENVI_str(i) for i in param_value]) + ' }'
else:
return param_value
return str(param_value)
def read_from_file(self, filePath):
assert ' ' not in filePath, "The given path contains whitespaces. This is not supported by GDAL."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment