Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Feb 15, 2023
1 parent ed1e6dd commit 6dcca0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FWCore/ParameterSet/python/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,10 +1538,10 @@ def handleProcessAccelerators(self, parameterSet):
resolved.update(acc)
# Sanity check
if len(invalid) != 0:
raise ValueError("Invalid pattern{} of {} in process.options.accelerators, valid values are {} or a pattern matching to some of them.".format(
raise ValueError("Invalid pattern{} of '{}' in process.options.accelerators, valid values are '{}' or a pattern matching some of them.".format(
"s" if len(invalid) > 2 else "",
",".join(invalid),
",".join(sorted(list(allAccelerators)))))
"', '".join(invalid),
"', '".join(sorted(list(allAccelerators)))))
selectedAccelerators = sorted(list(resolved))
parameterSet.addVString(False, "@selected_accelerators", selectedAccelerators)

Expand Down

0 comments on commit 6dcca0a

Please sign in to comment.