From 08d0d9eddcb98a0666d8af1d14efe62e67ae37f5 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 10 Jul 2024 15:13:06 -0400 Subject: [PATCH] Fix hook check --- pyperf/_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyperf/_hooks.py b/pyperf/_hooks.py index 36dd19e6..17f0c948 100644 --- a/pyperf/_hooks.py +++ b/pyperf/_hooks.py @@ -80,7 +80,7 @@ def __exit__(self, _exc_type, _exc_value, _traceback): class pystats(HookBase): def __init__(self): - if not hasattr(sys, "_pystats_on"): + if not hasattr(sys, "_stats_on"): raise HookError( "Can not collect pystats because python was not built with --enable-pystats" )