[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...
rmccabe at sourceware.org
rmccabe at sourceware.org
Thu Aug 23 19:00:32 UTC 2007
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
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.227.2.21&r2=1.227.2.22
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/08/22 20:57:26 1.227.2.21
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/08/23 19:00:30 1.227.2.22
@@ -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 ])
More information about the Cluster-devel
mailing list