def _handle_blacklist(blacklist, dirnames, filenames):
for norecurs in blacklist:<EOL><INDENT>if norecurs in dirnames:<EOL><INDENT>dirnames.remove(norecurs)<EOL><DEDENT>elif norecurs in filenames:<EOL><INDENT>filenames.remove(norecurs)<EOL><DEDENT><DEDENT>
remove files/directories in the black list

    dirnames/filenames are usually from os.walk