fix formatting if termcolor is not installed
This code was useless anyway
This commit is contained in:
parent
5cbebe0117
commit
63648a8353
1 changed files with 2 additions and 14 deletions
|
|
@ -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())):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue