diff options
author | Florence Blanc-Renaud <flo@redhat.com> | 2016-08-02 10:40:54 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-08-04 17:13:16 +0200 |
commit | cad6a551d6558441ead4b2b71d0b906ecefbdb63 (patch) | |
tree | 94f5f3728b3ff3b041b1cfb27b581779da0ee9f1 /ipaclient | |
parent | 2df047b8c51098bae9224b88dbdf03e5f9504f21 (diff) | |
download | freeipa-cad6a551d6558441ead4b2b71d0b906ecefbdb63.tar.gz freeipa-cad6a551d6558441ead4b2b71d0b906ecefbdb63.tar.xz freeipa-cad6a551d6558441ead4b2b71d0b906ecefbdb63.zip |
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>
Diffstat (limited to 'ipaclient')
-rw-r--r-- | ipaclient/plugins/hbactest.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipaclient/plugins/hbactest.py b/ipaclient/plugins/hbactest.py index 251871952..1b54530b2 100644 --- a/ipaclient/plugins/hbactest.py +++ b/ipaclient/plugins/hbactest.py @@ -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: |