summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-01-07 11:17:55 -0500
committerRob Crittenden <rcritten@redhat.com>2011-01-10 10:32:10 -0500
commit6f58f38748085e6a104de6f9e992469d3b685d5a (patch)
treeebc3a92f95feae19afc8ababcf306782e62988f8 /ipalib/frontend.py
parent0a79836082b897ebf734d9073583769cb276937c (diff)
downloadfreeipa-6f58f38748085e6a104de6f9e992469d3b685d5a.tar.gz
freeipa-6f58f38748085e6a104de6f9e992469d3b685d5a.tar.xz
freeipa-6f58f38748085e6a104de6f9e992469d3b685d5a.zip
Display the entries that failed when deleting with --continue.
We collected the failures but didn't report it back. This changes the API of most delete commands so rather than returning a boolean it returns a dict with the only current key as failed. This also adds a new parameter flag, suppress_empty. This will try to not print values that are empty if included. This makes the output of the delete commands a bit prettier. ticket 687
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 18ea7287d..7177bd185 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -895,6 +895,7 @@ class Command(HasParam):
labels = None
else:
labels = dict((p.name, unicode(p.label)) for p in self.output_params())
+ flags = dict((p.name, p.flags) for p in self.output_params())
for o in self.output:
outp = self.output[o]
@@ -912,13 +913,13 @@ class Command(HasParam):
# Return an error to the shell
rv = 1
if isinstance(outp, ListOfEntries):
- textui.print_entries(result, order, labels, print_all)
+ textui.print_entries(result, order, labels, flags, print_all)
elif isinstance(result, (tuple, list)):
- textui.print_entries(result, order, labels, print_all)
+ textui.print_entries(result, order, labels, flags, print_all)
elif isinstance(outp, Entry):
- textui.print_entry(result, order, labels, print_all)
+ textui.print_entry(result, order, labels, flags, print_all)
elif isinstance(result, dict):
- textui.print_entry(result, order, labels, print_all)
+ textui.print_entry(result, order, labels, flags, print_all)
elif isinstance(result, unicode):
if o == 'summary':
textui.print_summary(result)