Skip to content

Commit

Permalink
Remove an unneeded except KeyboardInterrupt
Browse files Browse the repository at this point in the history
KeyboardInterrupt is a subclass of BaseException, but not of Exception.
Hence if we remove this except, KeyboardInterrupts will still be raised
so the behavior stays the same.
  • Loading branch information
bluetech committed Feb 7, 2017
1 parent ccf9877 commit 87fb689
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions _pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ def getfixturemarker(obj):
exceptions."""
try:
return getattr(obj, "_pytestfixturefunction", None)
except KeyboardInterrupt:
raise
except Exception:
# some objects raise errors like request (from flask import request)
# we don't expect them to be fixture functions
Expand Down

0 comments on commit 87fb689

Please sign in to comment.