From 88ee944c4bc60b0df3b39ac734d8294c4250eb36 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Mon, 24 Jan 2011 21:39:35 +0100 Subject: [PATCH] BUGFIX: Problem when progressbar.py missing, problem with zero correct claims. --- gui/progressbarDummy.py | 6 ++++++ gui/test-mpa.py | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gui/progressbarDummy.py b/gui/progressbarDummy.py index 29ec2b3..cbe46d2 100644 --- a/gui/progressbarDummy.py +++ b/gui/progressbarDummy.py @@ -45,6 +45,12 @@ class ProgressBar(object): print " Done." +def SimpleProgress(): + return + +def ETA(): + return + def Percentage(): return diff --git a/gui/test-mpa.py b/gui/test-mpa.py index 22c31c9..ce6298e 100755 --- a/gui/test-mpa.py +++ b/gui/test-mpa.py @@ -464,6 +464,14 @@ def findAllMPA(protocolset,options=[],mpaoptions=[]): # Find all correct claims in each protocol (protocolset,correct,cpcount) = getCorrectIsolatedClaims(protocolset,options) print "Investigating %i correct claims in %i protocols." % (len(correct), cpcount) + + mpaprots = [] + res = [] + + if len(correct) == 0: + print "Nothing to do." + return res + if OPTS.verbose: """ When verbose, list correct claims in protocols @@ -570,8 +578,6 @@ def findAllMPA(protocolset,options=[],mpaoptions=[]): they are not, some other errors should have been reported by the Scyther backend anyway (conflicting protocol definitions in MPA analysis). """ - mpaprots = [] - res = [] for att in FOUND: pn = att.protocol() if pn not in mpaprots: