misc: skip count and total output in env.output_for_cli

Do not include the `count` and `total` output values in CLI output in
env.output_for_cli by default.

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta 2016-06-20 12:32:54 +02:00
parent 234270dc75
commit 5382864909

View File

@ -11,6 +11,9 @@ register = Registry()
@register(override=True) @register(override=True)
class env(CommandOverride): class env(CommandOverride):
def output_for_cli(self, textui, output, *args, **options): def output_for_cli(self, textui, output, *args, **options):
output = dict(output)
output.pop('count', None)
output.pop('total', None)
options['all'] = True options['all'] = True
return super(env, self).output_for_cli(textui, output, return super(env, self).output_for_cli(textui, output,
*args, **options) *args, **options)