Skip to content

Commit

Permalink
fix: __checkFileFormat for any hepmc3 filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc authored and andresailer committed Nov 10, 2022
1 parent 288f759 commit cc4c4c5
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 @@ -527,7 +527,7 @@ def __checkFileFormat(self, fileNames, extensions):
fileNames = [fileNames]
if not all(fileName.endswith(extensions) for fileName in fileNames):
self._errorMessages.append("ERROR: Unknown fileformat for file: %s" % fileNames)
if not self.hepmc3.useHepMC3 and fileName.endswith(".hepmc3"):
if not self.hepmc3.useHepMC3 and any(fileName.endswith(".hepmc3") for fileName in fileNames):
self._errorMessages.append("ERROR: HepMC3 files require the use of HepMC3 library")
return fileNames

Expand Down

0 comments on commit cc4c4c5

Please sign in to comment.