Skip to content

Commit

Permalink
pasta_analyse: fix error handling for mbox+succ mode
Browse files Browse the repository at this point in the history
mbox+succ won't work. We checked it, but did that too lately. Move it to
the top to prepone the sanity check of command line parameters.

Reported-by: Anmol Singh <Anmol.Singh@bmw.de>
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
  • Loading branch information
rralf committed Mar 3, 2020
1 parent d83aa09 commit a25ee74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/pasta_analyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ def analyse(config, prog, argv):
mbox = config.mode == Config.Mode.MBOX
mode = args.mode

if mbox and mode == 'succ':
log.error('Analysis mode succ is not available in mailbox mode!')
return -1

f_cluster, cluster = config.load_cluster(must_exist=False)

def fill_result(hashes, tag):
Expand Down Expand Up @@ -219,10 +223,6 @@ def fill_result(hashes, tag):

cherries = EvaluationResult()
if mode == 'succ':
if mbox:
log.error('Analysis mode succ is not available in mailbox mode!')
return -1

num_cpus = int(cpu_count() * args.cpu_factor)

psd = config.psd
Expand Down

0 comments on commit a25ee74

Please sign in to comment.