diff dataset.py @ 274:ed70580f2324

bugfix in FieldSubsetDataSet
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Thu, 05 Jun 2008 13:46:26 -0400
parents fa8abc813bd2
children 9b533cc7874a
line wrap: on
line diff
--- a/dataset.py	Thu Jun 05 11:47:44 2008 -0400
+++ b/dataset.py	Thu Jun 05 13:46:26 2008 -0400
@@ -621,7 +621,8 @@
         original_dataset=dataset
         if not fieldnames:
             fieldnames=dataset.fieldNames()
-        elif not fieldnames==dataset.fieldNames():
+        elif not list(fieldnames)==list(dataset.fieldNames()):
+            #we must cast to list, othersize('x','y')!=['x','y']
             dataset = FieldsSubsetDataSet(dataset,fieldnames)
         assert dataset.hasFields(*fieldnames)
         self.dataset=dataset