From 996fd82920105aad8e5bd9613043ce3a2d13d85a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 12 Feb 2019 10:09:07 -0500 Subject: [PATCH] Provide quality output on list output/default The output is better than default python treatment of list formatting. --- confluent_client/confluent/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/confluent_client/confluent/client.py b/confluent_client/confluent/client.py index f60faf85..64e9c3a9 100644 --- a/confluent_client/confluent/client.py +++ b/confluent_client/confluent/client.py @@ -444,9 +444,12 @@ def print_attrib_path(path, session, requestargs, options, rename=None): (currattr.get('default', None) is not None and currattr.get('value', None) is not None and currattr['value'] != currattr['default'])): + cval = ','.join(currattr['value']) if isinstance( + currattr['value'], list) else currattr['value'] + dval = ','.join(currattr['default']) if isinstance( + currattr['default'], list) else currattr['default'] cprint('{0}: {1}: {2} (Default: {3})'.format( - node, printattr, currattr['value'], - currattr['default'])) + node, printattr, cval, dval)) else: try: