From 5f3028018e20e471801d2c4a70722abf934d44ca Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Tue, 3 Oct 2023 15:49:30 +0200 Subject: [PATCH] Fix logic error in FinalPath checks --- FWCore/ParameterSet/python/Config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/FWCore/ParameterSet/python/Config.py b/FWCore/ParameterSet/python/Config.py index 698f37b2155c2..1eec39b8d9ff9 100644 --- a/FWCore/ParameterSet/python/Config.py +++ b/FWCore/ParameterSet/python/Config.py @@ -1285,10 +1285,9 @@ def _insertPaths(self, processPSet, nodeVisitor): iFinalPath.resolve(self.__dict__) finalpathValidator.setLabel(finalpathname) iFinalPath.visit(finalpathValidator) - if finalpathValidator.filtersOnFinalpaths or finalpathValidator.producersOnFinalpaths: - names = [p.label_ for p in finalpathValidator.filtersOnFinalpaths] - names.extend( [p.label_ for p in finalpathValidator.producersOnFinalpaths]) - raise RuntimeError("FinalPath %s has non OutputModules %s" % (finalpathname, ",".join(names))) + filtersOrProducers = finalpathValidator.filtersOnFinalpaths + finalpathValidator.producersOnFinalpaths + if filtersOrProducers: + raise RuntimeError("FinalPath %s has non OutputModules %s" % (finalpathname, ",".join(filtersOrProducers))) modulesOnFinalPath.extend(iFinalPath.moduleNames()) for m in modulesOnFinalPath: mod = getattr(self, m)