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

PR: Fix Profiler error when run is stopped #6238

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Jan 17, 2018

Fixes #6220.

This pull request addresses a few aspects of the issue reported.

  • When the Stop button was clicked when a profile was running, Spyder still attempted to display the profiler results even know there wouldn't have been any. The profiler only writes results when it finishes. The fix is to recognize the button event and display a different text to the user, along with clearing the datatree.

  • The load_data method in the ProfilerDataTree class assumed that the default results file existed, but if the run had been canceled, then this file doesn't exist. A try/except was added to this to catch file errors. Note that item 1 should prevent this from being called.

@pep8speaks
Copy link

pep8speaks commented Jan 17, 2018

Hello @csabella! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on January 17, 2018 at 23:32 Hours UTC

@ccordoba12 ccordoba12 changed the base branch from master to 3.x January 18, 2018 13:26
@ccordoba12 ccordoba12 added this to the v3.2.7 milestone Jan 18, 2018
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @csabella!

@ccordoba12 ccordoba12 changed the title PR: Profiler error when run is stopped PR: Fix Profiler error when run is stopped Jan 18, 2018
@ccordoba12 ccordoba12 merged commit 687f3e3 into spyder-ide:3.x Jan 18, 2018
ccordoba12 added a commit that referenced this pull request Jan 18, 2018
@csabella csabella deleted the issue6220 branch January 25, 2018 22:04
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.

3 participants