From 690daed430e09ccd575483e5e3d664144ae3b40d Mon Sep 17 00:00:00 2001 From: janezd Date: Fri, 7 Oct 2016 10:37:03 +0200 Subject: [PATCH] OWFile: Set self.data to None on error --- Orange/widgets/data/owfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Orange/widgets/data/owfile.py b/Orange/widgets/data/owfile.py index 9a6abd9836f..050cae512a5 100644 --- a/Orange/widgets/data/owfile.py +++ b/Orange/widgets/data/owfile.py @@ -266,6 +266,7 @@ def load_data(self): try: self.reader = self._get_reader() if self.reader is None: + self.data = None self.send("Data", None) self.info.setText("No data.") self.sheet_box.hide() @@ -283,6 +284,7 @@ def load_data(self): self.warning(warnings[-1].message.args[0] if warnings else '') if error: + self.data = None self.send("Data", None) self.info.setText("An error occurred:\n{}".format(error)) self.editor_model.reset()