From d624fb152dccdb268d83bce182f9ec17898ff455 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Fri, 14 Aug 2020 15:41:06 +0200 Subject: [PATCH] TriggerMenuMT: python 2 fix Fix use of metaclass to work with both py2 and py3. --- .../TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py index 63cc987b224..accecd09b26 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Config/ItemDef.py @@ -21,6 +21,8 @@ from ..Base.Thresholds import TopoThreshold from ..Base.CTPCondition import ThrCondition, InternalTrigger # noqa: F401 from .TriggerTypeDef import TT +from future.utils import with_metaclass + class ItemDef: @@ -44,7 +46,7 @@ class ItemDef: isHIV5 = 'HI_v5' in menuName isPhaseII = '_PhaseII' in menuName - class d(metaclass=meta_d): pass + class d(with_metaclass(meta_d)): pass # ... and make them accessible by their name for thr in tc.getDefinedThresholds(): -- GitLab