diff --git a/win32/Lib/win32pdhquery.py b/win32/Lib/win32pdhquery.py index 724a668a7..301b85c16 100644 --- a/win32/Lib/win32pdhquery.py +++ b/win32/Lib/win32pdhquery.py @@ -560,11 +560,11 @@ def __setstate__(self, volatilecounters): self.volatilecounters = volatilecounters -class QueryError: - def __init__(self, query): +class QueryError(Exception): + def __init__(self, query: BaseQuery): self.query = query def __repr__(self): - return "" % repr(self.query) + return f"" __str__ = __repr__