From d951b554cf3b528d79031eb754a5b13e131b5953 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Thu, 18 Jun 2009 12:10:36 -0400 Subject: [PATCH] Fix for detecting metadata column types in tabular files, the number of lines read for detecting column types will always be the max setting, with previously detected column types being overridden if appropriate ( e.g., int overridden with float ). This will only occur in files whose data varies between types within the same column. --- lib/galaxy/datatypes/tabular.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/datatypes/tabular.py b/lib/galaxy/datatypes/tabular.py index f75257c1fd0..8fa46c9e57c 100644 --- a/lib/galaxy/datatypes/tabular.py +++ b/lib/galaxy/datatypes/tabular.py @@ -121,8 +121,8 @@ class Tabular( data.Text ): #"column_types": ["int", "int", "str", "list"] first_line_column_types = column_types column_types = [ None for col in first_line_column_types ] - elif ( column_types and None not in column_types ) or i > num_check_lines: - #found and set all known columns, or we exceeded our max check lines + elif i > num_check_lines: + # We exceeded our max check lines break #we error on the larger number of columns