Skip to content

Commit

Permalink
Show an error message for non-existing challenges
Browse files Browse the repository at this point in the history
Closes #244
  • Loading branch information
danielmitterdorfer committed Mar 2, 2017
1 parent 5b24742 commit cdf32a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion esrally/racecontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ class Benchmark:
def __init__(self, cfg, sources=False, build=False, distribution=False, external=False, docker=False):
self.cfg = cfg
self.track = track.load_track(self.cfg)
challenge_name = self.cfg.opts("track", "challenge.name")
challenge = self.track.find_challenge_or_default(challenge_name)
if challenge is None:
raise exceptions.SystemSetupError("Track [%s] does not provide challenge [%s]. List the available tracks with %s list tracks."
% (self.track.name, challenge_name, PROGRAM_NAME))
self.metrics_store = metrics.metrics_store(
self.cfg,
track=self.track.name,
challenge=self.track.find_challenge_or_default(self.cfg.opts("track", "challenge.name")).name,
challenge=challenge.name,
read_only=False
)
self.race_store = metrics.race_store(self.cfg)
Expand Down

0 comments on commit cdf32a6

Please sign in to comment.