diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 3a05bb6eb8a..aa4b2fb12d5 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -1041,7 +1041,15 @@ def output_for_cli(self, textui, output, *args, **options): self.log_messages(output) - order = [p.name for p in self.output_params()] + order = [] + labels = {} + flags = {} + + for p in self.output_params(): + order.append(p.name) + labels[p.name] = unicode(p.label) + flags[p.name] = p.flags + if options.get('all', False): order.insert(0, 'dn') print_all = True @@ -1050,9 +1058,6 @@ def output_for_cli(self, textui, output, *args, **options): if options.get('raw', False): 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]