fix potential bug

empty columns must not be stripped
This commit is contained in:
M Bernt
2020-01-31 13:41:49 +01:00
parent 7dc87aed78
commit b5b4f09556
+1 -1
View File
@@ -1271,7 +1271,7 @@ class ColumnListParameter(SelectToolParameter):
try:
with open(dataset.get_file_name(), 'r') as f:
head = f.readline()
cnames = head.rstrip().split('\t')
cnames = head.rstrip("\n\r ").split('\t')
column_list = [('%d' % (i + 1), 'c%d: %s' % (i + 1, x)) for i, x in enumerate(cnames)]
if self.numerical: # If numerical was requested, filter columns based on metadata
if hasattr(dataset, 'metadata') and hasattr(dataset.metadata, 'column_types'):