Skip to content

Commit 4068e88

Browse files
astariclanzagar
authored andcommitted
owdatasets: New-style signals
1 parent 533da46 commit 4068e88

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]]
@@ -404,7 +406,7 @@ def commit(self):
404406
self.setBlocking(False)
405407
self.commit_cached(di.prefix, di.filename)
406408
else:
407-
self.send("Data", None)
409+
self.Outputs.data.send(None)
408410

409411
@Slot(object)
410412
def __commit_complete(self, f):
@@ -434,11 +436,11 @@ def __commit_complete(self, f):
434436
data = Orange.data.Table(path)
435437
else:
436438
data = None
437-
self.send("Data", data)
439+
self.Outputs.data.send(data)
438440

439441
def commit_cached(self, prefix, filename):
440442
path = LocalFiles(local_cache_path()).localpath(prefix, filename)
441-
self.send("Data", Orange.data.Table(path))
443+
self.Outputs.data.send(Orange.data.Table(path))
442444

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

0 commit comments

Comments
 (0)