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" )