From 53c218cf2fd51b0e10938e30ecb25676c0c0d030 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 11 Oct 2010 12:51:08 -0400 Subject: Return non-zero when the number of entries from *-find returned is zero. ticket 325 --- ipalib/frontend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index c9c070def..5486a19a5 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -896,7 +896,9 @@ class Command(HasParam): continue result = output[o] - if o.lower() == 'failed': + if o.lower() == 'count' and result == 0: + rv = 1 + elif o.lower() == 'failed': if self.number_failed(result) == 0: # Don't display an empty failed list continue -- cgit