Skip to content

Commit 82ccd0e

Browse files
astariclanzagar
authored andcommitted
owdatasets: New-style signals
1 parent be0dbfe commit 82ccd0e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Orange/widgets/data/owdatasets.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
from Orange.misc.environ import data_dir
3131
from Orange.widgets import widget, settings, gui
32+
from Orange.widgets.utils.signals import Output
3233
from Orange.widgets.widget import Msg
3334

3435
INDEX_URL = "http://datasets.orange.biolab.si/"
@@ -118,7 +119,8 @@ class Warning(widget.OWWidget.Warning):
118119
only_local_datasets = Msg("Could not fetch data sets list, only local "
119120
"cached data sets are shown")
120121

121-
outputs = [("Data", Orange.data.Table)]
122+
class Outputs:
123+
data = Output("Data", Orange.data.Table)
122124

123125
#: Selected data set id
124126
selected_id = settings.Setting(None) # type: Optional[Tuple[str, str]]
@@ -403,7 +405,7 @@ def commit(self):
403405
self.setBlocking(False)
404406
self.commit_cached(di.prefix, di.filename)
405407
else:
406-
self.send("Data", None)
408+
self.Outputs.data.send(None)
407409

408410
@Slot(object)
409411
def __commit_complete(self, f):
@@ -433,11 +435,11 @@ def __commit_complete(self, f):
433435
data = Orange.data.Table(path)
434436
else:
435437
data = None
436-
self.send("Data", data)
438+
self.Outputs.data.send(data)
437439

438440
def commit_cached(self, prefix, filename):
439441
path = LocalFiles(local_cache_path()).localpath(prefix, filename)
440-
self.send("Data", Orange.data.Table(path))
442+
self.Outputs.data.send(Orange.data.Table(path))
441443

442444
@Slot()
443445
def __progress_advance(self):

0 commit comments

Comments
 (0)