mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Fix ipa hbactest output
ipa hbactest command produces a Traceback (TypeError: cannot concatenate 'str' and 'bool' objects) This happens because hbactest overrides output_for_cli but does not properly handle the output for 'value' field. 'value' contains a boolean but it should not be displayed (refer to ipalib/frontend.py, Command.output_for_cli()). Note that the issue did not appear before because the 'value' field had a flag no_display. https://fedorahosted.org/freeipa/ticket/6157 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
2df047b8c5
commit
cad6a551d6
@ -39,13 +39,15 @@ class hbactest(CommandOverride):
|
||||
# to be printed as our execute() method will return None for corresponding
|
||||
# entries and None entries will be skipped.
|
||||
for o in self.output:
|
||||
if o == 'value':
|
||||
continue
|
||||
outp = self.output[o]
|
||||
if 'no_display' in outp.flags:
|
||||
continue
|
||||
result = output[o]
|
||||
if isinstance(result, (list, tuple)):
|
||||
textui.print_attribute(unicode(outp.doc), result, '%s: %s', 1, True)
|
||||
elif isinstance(result, (unicode, bool)):
|
||||
elif isinstance(result, unicode):
|
||||
if o == 'summary':
|
||||
textui.print_summary(result)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user