From ffc64d7975aba80256c2be4293d45a87ff4d60d9 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Sun, 14 Jun 2020 01:16:43 +0200 Subject: [PATCH] Fix AttributeError when pipeline hooks are defined in a mixin class --- reframe/core/meta.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reframe/core/meta.py b/reframe/core/meta.py index 02e09f43b8..fc1786b3ea 100644 --- a/reframe/core/meta.py +++ b/reframe/core/meta.py @@ -48,6 +48,9 @@ def __init__(cls, name, bases, namespace, **kwargs): for v in namespace.values(): for b in bases: + if not hasattr(b, '_final_methods'): + continue + if callable(v) and v.__name__ in b._final_methods: msg = (f"'{cls.__qualname__}.{v.__name__}' attempts to " f"override final method "