Skip to content

Commit

Permalink
OWFile: Set self.data to None on error
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Oct 7, 2016
1 parent 3668622 commit 690daed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Orange/widgets/data/owfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 690daed

Please sign in to comment.