def filter_release_name(name, filter_words):
 if filter_words:
  for test_word in filter_words.split(','):
   test_word = test_word.strip()
   if test_word:
    if re.search((('(^|[\\W_])' + test_word) + '($|[\\W_])'), name, re.I):
     logger.log((((u'' + name) + ' contains word: ') + test_word), logger.DEBUG)
     return True
 return False

def filter_release_name ( name , filter_words ) : if filter_words : for test_word in filter_words . split ( ',' ) : test_word = test_word . strip ( ) if test_word : if re . search ( ( ( '(^|[\\W_])' + test_word ) + '($|[\\W_])' ) , name , re . I ) : logger . log ( ( ( ( u'' + name ) + ' contains word: ' ) + test_word ) , logger . DEBUG ) return True return False
filters out results based on filter_words name: name to check filter_words : words to filter on .