From d20d9a4afd7a354240ecade177dc23f8f03c77c8 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 12 Dec 2024 09:33:51 +0100 Subject: [PATCH] Fix for importing ClassesDefXmlUtils --- FWCore/Reflection/scripts/edmCheckClassVersion | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FWCore/Reflection/scripts/edmCheckClassVersion b/FWCore/Reflection/scripts/edmCheckClassVersion index ecd795cabbbac..7f59f06278582 100755 --- a/FWCore/Reflection/scripts/edmCheckClassVersion +++ b/FWCore/Reflection/scripts/edmCheckClassVersion @@ -1,7 +1,12 @@ #! /usr/bin/env python3 import sys -import FWCore.Reflection.ClassesDefXmlUtils as ClassesDefUtils +try: + import FWCore.Reflection.ClassesDefXmlUtils as ClassesDefUtils +except: + import os + sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),"python")) + import ClassesDefXmlUtils as ClassesDefUtils # recursively check the base classes for a class pointer # as building the streamer will crash if base classes are