File crm_history_9_709ef91cfada.patch of Package pacemaker
# HG changeset patch
# User Dejan Muhamedagic <dejan@hello-penguin.com>
# Date 1314196090 -7200
# Node ID 709ef91cfada2822aca53dcef085ddb6952393c5
# Parent 3a81b7eae66672dd9873fe6b53ee3c0da6fc87d7
Low: Shell: update pe not found message
diff --git a/shell/modules/ui.py.in b/shell/modules/ui.py.in
--- a/shell/modules/ui.py.in
+++ b/shell/modules/ui.py.in
@@ -1822,7 +1822,6 @@ Examine Pacemaker's history: node and re
crm_report.refresh_source()
f = self._get_pe_byidx(-1)
if not f:
- common_err("no transitions found")
return False
crm_report.show_transition_log(f)
def resource(self,cmd,*args):
@@ -1878,7 +1877,7 @@ Examine Pacemaker's history: node and re
def _get_pe_byidx(self, idx):
l = crm_report.pelist()
if len(l) < abs(idx):
- common_err("pe input file not found")
+ common_err("pe input file for index %d not found" % (idx+1))
return None
return l[idx]
def _get_pe_bynum(self, n):
@@ -1913,7 +1912,8 @@ Examine Pacemaker's history: node and re
f = self._get_pe_bynum(n)
argl.pop(0)
else:
- f = self._get_pe_byidx(-1)
+ common_err("<%s> doesn't sound like a PE input" % argl[0])
+ return False
else:
f = self._get_pe_byidx(-1)
if not f:
@@ -1922,8 +1922,7 @@ Examine Pacemaker's history: node and re
if subcmd == "show":
self.pe_file = f # self.pe_file needed by self.ptest
common_info("running ptest with %s" % f)
- rc = ptestlike(self.ptest,'vv',"%s %s" % \
- (cmd, subcmd), *argl)
+ rc = ptestlike(self.ptest,'vv', cmd, *argl)
else:
f = crm_report.pe2dot(f)
if not f: