Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] OWFile: Show error msg when file doesn't exists #2024

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Feb 17, 2017

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
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Feb 17, 2017

Codecov Report

Merging #2024 into master will increase coverage by 0.01%.
The diff coverage is 91.42%.

@@            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       +2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2937586...99b7b42. Read the comment docs.

@@ -219,6 +222,9 @@ def __init__(self):

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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ;)

@lanzagar lanzagar self-assigned this Feb 17, 2017
@lanzagar lanzagar added this to the future milestone Feb 17, 2017
@lanzagar lanzagar changed the title OWFile: Show error msg when file doesn't exists [FIX] OWFile: Show error msg when file doesn't exists Feb 17, 2017
@lanzagar lanzagar merged commit 60395fb into biolab:master Feb 17, 2017
@astaric astaric modified the milestone: future Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants