conga/luci/site/luci/Extensions cluster_adapte ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-08-23 19:00:31
Modified files:
luci/site/luci/Extensions: cluster_adapters.py
Log message:
Fix 253906: Quorum disk page: Error when trying to continue w/o a heuristic (it seems
luci/site/luci/Extensions/cluster_adapters.py +6 -6
@@ -1109,7 +1109,7 @@ for i in xrange(num_heuristics): try: h = form['heuristic%d' % i] - if not h or len(h) != 3: + if not h or len(h) != 3 or not (h[0].strip() and h[1].strip() and h[2].strip()): continue except: continue
@@ -1119,26 +1119,26 @@ if not hprog: raise Exception, 'no hprog' except Exception, e: - errors.append('No program was given for heuristic %d' % i + 1) + errors.append('No program was given for heuristic %d' % (i + 1)) try: hint = int(h[1]) if hint < 1: raise ValueError, 'Heuristic interval values must be greater than 0' except KeyError, e: - errors.append('No interval was given for heuristic %d' % i + 1) + errors.append('No interval was given for heuristic %d' % (i + 1)) except ValueError, e: errors.append('An invalid interval was given for heuristic %d: %s' \ - % (i + 1, str(e))) + % ((i + 1), str(e))) try: hscore = int(h[2]) if hscore < 1: raise ValueError, 'Heuristic scores must be greater than 0' except KeyError, e: - errors.append('No score was given for heuristic %d' % i + 1) + errors.append('No score was given for heuristic %d' % (i + 1)) except ValueError, e: errors.append('An invalid score was given for heuristic %d: %s' \ - % (i + 1, str(e))) + % ((i + 1), str(e))) heuristics.append([ hprog, hint, hscore ])