def METHOD_NAME(self, line):
    for prog in self.file_line_progs:
        match = prog.search(line)
        if match:
            filename, lineno = match.group(1, 2)
            try:
                f = open(filename, "r")
                f.close()
                break
            except IOError:
                continue
    else:
        return None
    try:
        return filename, int(lineno)
    except TypeError:
        return None