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

NameError: name 'FileNotFoundError' is not defined when a specific browser is chosen #93

Merged
merged 1 commit into from May 5, 2014

Conversation

Projects
None yet
1 participant
@JonnyJD
Owner

JonnyJD commented May 5, 2014

In Python <= 3.2 Popen throws OSError. Starting with Python 3.3 it throws FileNotFoundError which is a subclass.

isrcsubmit expects FileNotFoundError, leading to an uncatched NameError instead on Python <= 3.2.

The impact is quite small, because the problem only shows up when a browser is explicitely set as parameter or in the config and it is not found.
And in that case it fails either way, but failing with an error message is better than with this NameError.

The problem was originally found by Jozo with PyFlakes.

@JonnyJD JonnyJD added this to the 2.0.1 milestone May 5, 2014

@JonnyJD JonnyJD self-assigned this May 5, 2014

FileNotFoundError is not defined with Python <= 3.2
So we can't use it.
I really liked that Exception though :-D

@JonnyJD JonnyJD merged commit 35f515c into master May 5, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

JonnyJD added a commit that referenced this pull request May 5, 2014

Merge branch 'file_not_found'
see pull request #93

@JonnyJD JonnyJD deleted the file_not_found branch May 5, 2014

@JonnyJD JonnyJD added the usability label May 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment