#NEWLINE# def _addRule( self , isWhitelist , rule ) : #NEWLINE# #INDENT# 'Add an (isWhitelist, rule) pair to the rule list.' #NEWLINE# if ( isinstance ( rule , six . string_types ) or hasattr ( rule , '__call__' ) ) : #NEWLINE# #INDENT# self . rules . append ( ( isWhitelist , rule ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( ( 'Graphite logging rules must be glob pattern or callable. Invalid: %r' % rule ) )