mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix output for commands that do not return entries.
I also changed the default value of the print_all argument in textui.print_entry from False to True. It think it makes more sense this way, because: 1) if order is None, it will still print something 2) if order is not None, it will print what's in order first and then the rest 3) commands that care about the print_all argument have to set it in any case, those that don't care usually want to print everything
This commit is contained in:
committed by
Rob Crittenden
parent
4a61ff681c
commit
c7a35f95c5
@@ -315,7 +315,7 @@ class textui(backend.Backend):
|
||||
for attr in sorted(entry):
|
||||
print_attr(attr)
|
||||
|
||||
def print_entries(self, entries, order=None, labels=None, print_all=False, format='%s: %s', indent=1):
|
||||
def print_entries(self, entries, order=None, labels=None, print_all=True, format='%s: %s', indent=1):
|
||||
assert isinstance(entries, (list, tuple))
|
||||
first = True
|
||||
for entry in entries:
|
||||
@@ -324,7 +324,7 @@ class textui(backend.Backend):
|
||||
first = False
|
||||
self.print_entry(entry, order, labels, print_all, format, indent)
|
||||
|
||||
def print_entry(self, entry, order=None, labels=None, print_all=False, format='%s: %s', indent=1):
|
||||
def print_entry(self, entry, order=None, labels=None, print_all=True, format='%s: %s', indent=1):
|
||||
"""
|
||||
"""
|
||||
if isinstance(entry, (list, tuple)):
|
||||
|
||||
Reference in New Issue
Block a user