Remove an unneeded `except KeyboardInterrupt`

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.
This commit is contained in:
Ran Benita 2017-02-07 14:00:13 +02:00
parent ccf9877447
commit 87fb689ab1
1 changed files with 0 additions and 2 deletions

View File

@ -124,8 +124,6 @@ def getfixturemarker(obj):
exceptions.""" exceptions."""
try: try:
return getattr(obj, "_pytestfixturefunction", None) return getattr(obj, "_pytestfixturefunction", None)
except KeyboardInterrupt:
raise
except Exception: except Exception:
# some objects raise errors like request (from flask import request) # some objects raise errors like request (from flask import request)
# we don't expect them to be fixture functions # we don't expect them to be fixture functions