From c72013343b41b6e6442bb5dec0ebffb5a830bd06 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@8a9318a1-56ba-4d59-b755-99d26321be01> Date: Wed, 26 Aug 2009 21:49:45 +0000 Subject: [PATCH] correcting interaction between shouldIncludeImages in settings and the new plot only on fail feature git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@74 8a9318a1-56ba-4d59-b755-99d26321be01 --- pyglance/glance/compare.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyglance/glance/compare.py b/pyglance/glance/compare.py index f5cea6a..d38ca23 100644 --- a/pyglance/glance/compare.py +++ b/pyglance/glance/compare.py @@ -971,9 +971,14 @@ python -m glance variableAnalysisInfo[varKey]['var_stats'], defaultValues) varRunInfo['did_pass'] = didPass - if ('only_plot_on_fail' in varRunInfo) and (varRunInfo['only_plot_on_fail']) : - varRunInfo['shouldIncludeImages'] = ((not didPass) and varRunInfo['only_plot_on_fail'] - and ((not ('shouldIncludeImages' in varRunInfo)) or varRunInfo['shouldIncludeImages'])) + # based on the settings the user gave and whether the variable passsed or failed, + # should we include images for this variable? + currentIncludeImages = runInfo['shouldIncludeImages'] + if ('shouldIncludeImages' in varRunInfo) : + currentIncludeImages = varRunInfo['shouldIncludeImages'] + if ('only_plot_on_fail' in varRunInfo) : + varRunInfo['shouldIncludeImages'] = currentIncludeImages and (not (varRunInfo['only_plot_on_fail'] and didPass)) + # set the rest of our info variableAnalysisInfo[varKey]['run_info'] = varRunInfo variableAnalysisInfo[varKey]['exp_name'] = explanationName -- GitLab