From 5f50429a2d18d03863650948629cbfcfdcaf76e9 Mon Sep 17 00:00:00 2001 From: poka Date: Sat, 28 Nov 2020 06:31:08 +0100 Subject: [PATCH] Improve no colors --- lib/historylib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/historylib.py b/lib/historylib.py index ab4abfc..4ffeff7 100644 --- a/lib/historylib.py +++ b/lib/historylib.py @@ -181,7 +181,10 @@ class History: print('-'.center(rows-1, '-')) print('|', end='') printKey = t[2][0:8] + '\u2026\u2026' + t[2][-3:] - print(colored(" {: <18} | {: <14} | {: <7} | {: <7} | {: <30}".format(date, printKey, amount, amountUD, comment), color)) + if noColors: + print(" {: <18} | {: <14} | {: <7} | {: <7} | {: <30}".format(date, printKey, amount, amountUD, comment)) + else: + print(colored(" {: <18} | {: <14} | {: <7} | {: <7} | {: <30}".format(date, printKey, amount, amountUD, comment), color)) print('|', end='') print('-'.center(rows-1, '-')) print('|', end='')