Skip to content

Commit

Permalink
DDSim: nicer printout for checkFileFormat error
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Mar 26, 2024
1 parent da34149 commit 9cf0568
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DDG4/python/DDSim/DD4hepSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9cf0568

Please sign in to comment.