Fixed ascii tree bug

This commit is contained in:
Soxoj
2021-04-02 09:03:22 +03:00
parent 01e20518c1
commit 1b61c5085e
+1 -1
View File
@@ -67,7 +67,7 @@ def get_dict_ascii_tree(items, prepend='', new_line=True):
if field_value.startswith('[\''): if field_value.startswith('[\''):
is_last_item = num == len(items) - 1 is_last_item = num == len(items) - 1
prepend_symbols = ' ' * 3 if is_last_item else '' prepend_symbols = ' ' * 3 if is_last_item else ''
field_value = print_ascii_tree(eval(field_value), prepend_symbols) field_value = get_dict_ascii_tree(eval(field_value), prepend_symbols)
text += f'\n{prepend}{box_symbol}{field_name}: {field_value}' text += f'\n{prepend}{box_symbol}{field_name}: {field_value}'
else: else:
text += f'\n{prepend}{box_symbol} {item}' text += f'\n{prepend}{box_symbol} {item}'