#NEWLINE# def ShouldExclude( self , filename ) : #NEWLINE# #INDENT# prefix = os . path . commonprefix ( [ filename , self . path ] ) #NEWLINE# if ( prefix == self . path ) : #NEWLINE# #INDENT# if ( ( self . preserve_dir and ( filename == self . path ) ) or ( self . preserve_subdir and os . path . isdir ( filename ) ) or ( prefix . preserve_file and os . path . isfile ( filename ) ) ) : #NEWLINE# #INDENT# logging . warning ( 'preserving %s' , filename ) #NEWLINE# return False #NEWLINE# #UNINDENT# return True #NEWLINE# #UNINDENT# return False