summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-01-25 23:12:22 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-01-25 23:12:22 +0100
commit81dea9267687be59ac16898bef6e0840ef683282 (patch)
treeaaa699f9cf805ea0d1b3dcb82bdda4ecd142c8da
parent742789b8ca77f1c4f79dfc5abdcb5a52ff28a327 (diff)
downloadqutebrowser-81dea9267687be59ac16898bef6e0840ef683282.tar.gz
qutebrowser-81dea9267687be59ac16898bef6e0840ef683282.zip
Don't call signal.signal with None-handler in tests
This is a TypeError with PYTHONDEVMODE.
-rw-r--r--tests/unit/components/test_misccommands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/components/test_misccommands.py b/tests/unit/components/test_misccommands.py
index e1c2d1de6..d41c0cc37 100644
--- a/tests/unit/components/test_misccommands.py
+++ b/tests/unit/components/test_misccommands.py
@@ -35,7 +35,8 @@ def _trapped_segv(handler):
"""Temporarily install given signal handler for SIGSEGV."""
old_handler = signal.signal(signal.SIGSEGV, handler)
yield
- signal.signal(signal.SIGSEGV, old_handler)
+ if old_handler is not None:
+ signal.signal(signal.SIGSEGV, old_handler)
def test_debug_crash_exception():