From 63648a83539b2977ea73255e4cb92ca842be5e06 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 30 Jul 2013 18:51:49 +0200 Subject: [PATCH] fix formatting if termcolor is not installed This code was useless anyway --- .../tools/application/formatters/iformatter.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/weboob/tools/application/formatters/iformatter.py b/weboob/tools/application/formatters/iformatter.py index 1ec8fd86..2eba0a2f 100644 --- a/weboob/tools/application/formatters/iformatter.py +++ b/weboob/tools/application/formatters/iformatter.py @@ -73,20 +73,8 @@ class MandatoryFieldsNotFound(Exception): class IFormatter(object): MANDATORY_FIELDS = None - def get_bold(self): - if self.outfile != sys.stdout: - return '' - else: - return ConsoleApplication.BOLD - - def get_nc(self): - if self.outfile != sys.stdout: - return '' - else: - return ConsoleApplication.NC - - BOLD = property(get_bold) - NC = property(get_nc) + BOLD = ConsoleApplication.BOLD + NC = ConsoleApplication.NC def colored(self, string, color, attrs=None, on_color=None): if self.outfile != sys.stdout or not (os.isatty(self.outfile.fileno())):