Grouping tool bug fix, bug fix for call to Tabular().set_meta() in JobWrapper.

This commit is contained in:
Greg Von Kuster
2007-08-27 13:11:47 +00:00
parent c868f3180c
commit 398b53a974
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -225,7 +225,7 @@ class JobWrapper( object ):
"""
for dataset_assoc in job.input_datasets:
dataset = dataset_assoc.dataset
if isinstance(dataset.datatype, Tabular) and dataset.missing_meta():
if issubclass(type(dataset.datatype), type(self.app.datatypes_registry.get_datatype_by_extension('tabular'))) and dataset.missing_meta():
Tabular().set_meta(dataset)
# Resore input / output data lists
inp_data = dict( [ ( da.name, da.dataset ) for da in job.input_datasets ] )
@@ -335,7 +335,7 @@ class JobWrapper( object ):
is a temporary work-around to ensure columns metadata attribute is set.
This code will be eliminated soon...
"""
if isinstance(dataset.datatype, Tabular) and dataset.missing_meta():
if issubclass(type(dataset.datatype), type(self.app.datatypes_registry.get_datatype_by_extension('tabular'))) and dataset.missing_meta():
Tabular().set_meta(dataset)
dataset.set_peek()
else:
+1 -1
View File
@@ -44,7 +44,7 @@ for k,col in enumerate(cols):
only aggregation function that can be used on columns containing strings.
"""
try:
map( float, elems[col] )
float( elems[col] )
except:
print >> sys.stderr, "Operation '%s' cannot be performed on non-numeric column %d containing value %s." %(ops[k], col+1, elems[col])
sys.exit()