[FIX] OWFile: Show error msg when file doesn't exists#2024
Merged
lanzagar merged 1 commit intobiolab:masterfrom Feb 17, 2017
Merged
[FIX] OWFile: Show error msg when file doesn't exists#2024lanzagar merged 1 commit intobiolab:masterfrom
lanzagar merged 1 commit intobiolab:masterfrom
Conversation
9e1cd25 to
496b451
Compare
Codecov Report
@@ Coverage Diff @@
## master #2024 +/- ##
==========================================
+ Coverage 70.22% 70.23% +0.01%
==========================================
Files 343 343
Lines 54092 54123 +31
==========================================
+ Hits 37984 38013 +29
- Misses 16108 16110 +2Continue to review full report at Codecov.
|
lanzagar
reviewed
Feb 17, 2017
Orange/widgets/data/owfile.py
Outdated
| if self.source == self.LOCAL_FILE: | ||
| last_path = self.last_path() | ||
| if last_path and not os.path.exists(last_path): | ||
| self.Error.file_not_found() |
Contributor
There was a problem hiding this comment.
Why is the error checking duplicated here? If this is removed, the error is still correctly thrown in load_data, right?
Of course you need to check that the path exists in the next if otherwise you can't safely check the size... But the cyclomatic complexity would still be lower by one ;)
…xt available file in the list
496b451 to
99b7b42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
When opening a workflow whose dataset is not found, 'Iris' dataset opens.
Error message should be shown instead.
Description of changes
Show error msg when file doesn't exists instead of opening next available file in the list
Nonexistent file's name is colored red.
Includes