#NEWLINE# def __init__( self , color , * args , **kwargs ) : #NEWLINE# #INDENT# logging . Formatter . __init__ ( self , * args , ** kwargs ) #NEWLINE# self . _color = color #NEWLINE# if color : #NEWLINE# #INDENT# fg_color = ( curses . tigetstr ( 'setaf' ) or curses . tigetstr ( 'setf' ) or '' ) #NEWLINE# if ( ( 3 , 0 ) < sys . version_info < ( 3 , 2 , 3 ) ) : #NEWLINE# #INDENT# fg_color = six . text_type ( fg_color , 'ascii' ) #NEWLINE# #UNINDENT# self . _colors = { #NEWLINE# #INDENT# logging . DEBUG : six . text_type ( curses . tparm ( fg_color , 4 ) , 'ascii' ) , #NEWLINE# logging . INFO : six . text_type ( curses . tparm ( fg_color , 2 ) , 'ascii' ) , #NEWLINE# logging . WARNING : six . text_type ( curses . tparm ( fg_color , 3 ) , 'ascii' ) , #NEWLINE# logging . ERROR : six . text_type ( curses . tparm ( fg_color , 1 ) , 'ascii' ) , #NEWLINE# #UNINDENT# } #NEWLINE# self . _normal = six . text_type ( curses . tigetstr ( 'sgr0' ) , 'ascii' )