-
Notifications
You must be signed in to change notification settings - Fork 10
Fix broken CI test, apply new lint rules #15
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
base: master
Are you sure you want to change the base?
Conversation
pytest-flake8 handles them.
@@ -197,7 +197,7 @@ def remotes(self): | |||
extra={'user_waiting': False}) | |||
return dict((alias, fmt(remote)) | |||
for alias, remote in result.items()) | |||
except: | |||
except Exception: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, it was intended to catch KeyboardInterrupt
as well. It's better catch BaseException
here IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching BaseException
is still harmful because BaseException
includes non-error exceptions like StopIteration
or GeneratorExit
. I think it is better to catch Exception
and KeyboardInterrupt
explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's not the case here, because the only thing this except:
clause does is just logging and reraising. What's your opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it's much better to handle KeyboardInterrupt
separately instead treating it as an error, since the situation when KeyboardInterrupt
has been raised represents the obvious intention to abort this execution, not an unexpected failure.
Although I approved, I don't have permission to merge this. |
No more traceback while pressing Ctrl+C.
https://travis-ci.org/spoqa/geofront-cli/jobs/533189683
……Time to consider dropping support for 3.3? |
Python 3.3 support now seems unrealistic. How about dropping this and bumping the minor version? |
It makes sense. |
xcode8.1 already obsoleted. Previous builds are fallen back to default version (xcode9.4)
3ad7392
to
8c4f0b3
Compare
flake8
execution. It will be run bypytest-flake8
plugin.KeyboardInterrupt
.Blocks #11 and #14.