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 setup.py under python2 #5392

Merged
merged 2 commits into from Sep 23, 2017
Merged

Fix setup.py under python2 #5392

merged 2 commits into from Sep 23, 2017

Conversation

inclement
Copy link
Member

The setup.py currently has an except FileNotFoundError, but if an exception does occur then this crashes because FileNotFoundError was introduced only in Python 3. Using OSError instead seems to be the right way to catch the error in both versions.

inclement and others added 2 commits September 21, 2017 22:34
The setup.py currently has an `except FileNotFoundError`, but if an exception does occur then this crashes because FileNotFoundError was introduced only in Python 3. Using OSError instead seems to be the right way to catch the error in both versions.
@KeyWeeUsr
Copy link
Contributor

Unfortunately Windows is kind of special and on 2.7.11 returns an IOError instead which escapes the FileNotFoundError, OSError. My bad, I should have doublechecked it before.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/wop/wopwop/wop_.txt'

@KeyWeeUsr KeyWeeUsr merged commit 6c45e28 into master Sep 23, 2017
@KeyWeeUsr KeyWeeUsr deleted the inclement-patch-1 branch September 23, 2017 16:42
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.

None yet

2 participants