mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipalib/frontend.py output_for_cli loops optimization
Trivial fix which removes unnecessary for loops. Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
4af36de102
commit
197b5ca639
@@ -1041,7 +1041,15 @@ class Command(HasParam):
|
||||
|
||||
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 @@ class Command(HasParam):
|
||||
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user