From 9cf05687c149cd80681ffc81476580d1f1fba849 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Tue, 26 Mar 2024 18:06:34 +0100 Subject: [PATCH] DDSim: nicer printout for checkFileFormat error --- DDG4/python/DDSim/DD4hepSimulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index 24e3ee0f2..509de7923 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -561,7 +561,7 @@ def __checkFileFormat(self, fileNames, extensions): if isinstance(fileNames, str): fileNames = [fileNames] if not all(fileName.endswith(tuple(extensions)) for fileName in fileNames): - self._errorMessages.append("ERROR: Unknown fileformat for file: %s" % fileNames) + self._errorMessages.append(f"ERROR: Unknown fileformat for file(s): {','.join(fileNames)}") is_hepmc3_extension = any(fileName.endswith(tuple(HEPMC3_SUPPORTED_EXTENSIONS)) for fileName in fileNames) if not self.hepmc3.useHepMC3 and is_hepmc3_extension: self._errorMessages.append("ERROR: HepMC3 files or compressed HepMC2 require the use of HepMC3 library")