aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-02-11 16:56:37 +0000
committerBryn M. Reeves <bmr@redhat.com>2014-02-11 16:56:37 +0000
commit61e8147e436533c5ccb75a6061a4fcc7368970b6 (patch)
tree9e6249d2de3ea07bb0889e1544997d0a7bf1884f
parentc48b762c2e98ee05a17375af7427af702f9c9925 (diff)
downloadsos-61e8147e436533c5ccb75a6061a4fcc7368970b6.tar.gz
Improve error message when cluster.crm_from is invalid
If a user passes a non-date string value as the crm_from parameter of the cluster plugin an error message is logged: crm_from parameter 'True' is not a valid date The plugin continues to run and uses the default value (T-72hrs) as the value of crm_from. Make this clear in the message displayed to users: crm_from parameter 'True' is not a valid date: using default Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/cluster.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py
index eeacdabb..8d73dc1d 100644
--- a/sos/plugins/cluster.py
+++ b/sos/plugins/cluster.py
@@ -93,7 +93,8 @@ class Cluster(Plugin, RedHatPlugin):
str(self.get_option('crm_from'))):
crm_from = self.get_option('crm_from')
else:
- self.soslog.error("crm_from parameter '%s' is not a valid date"
+ self.soslog.error(
+ "crm_from parameter '%s' is not a valid date: using default"
% self.get_option('crm_from'))
crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report')