cli.print_attribute: Convert values to strings

When output_for_cli was called directly, rather than for values
received through XML or JSON API, joining multiple values failed
on non-strings such as DN objects.

Convert output to strings before printing it out.
This commit is contained in:
Petr Viktorin 2013-11-26 23:31:05 +01:00 committed by Martin Kosek
parent 0accfabfa3
commit 7ec4d58bf7

View File

@ -293,7 +293,7 @@ class textui(backend.Backend):
return
else:
if len(value) > 0:
text = ', '.join(value)
text = ', '.join(str(v) for v in value)
else:
return
line_len = self.get_tty_width()