Changeset 4664:5be52ec5a0b6 in orange


Ignore:
Timestamp:
05/18/08 19:34:11 (6 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
db8cdce690754a6b9773f872a94273b4f1af61f4
Message:
  • fixed a crash when the test data was removed (orange.Filter_hasClassValue did not like None as the argument)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Evaluate/OWTestLearners.py

    r4622 r4664  
    325325    def setTestData(self, data): 
    326326        """handle test data set""" 
    327         self.testdata = orange.Filter_hasClassValue(data) 
    328         self.testDataBtn.setEnabled(self.testdata <> None) 
    329         if self.testdata: 
     327        if data is None: 
     328            self.testdata = None 
     329        else: 
     330            self.testdata = orange.Filter_hasClassValue(data) 
     331        self.testDataBtn.setEnabled(self.testdata is not None) 
     332        if self.testdata is not None: 
    330333            if self.resampling == 4: 
    331334                if self.data: 
Note: See TracChangeset for help on using the changeset viewer.