def collect_modules(self):
        """Generator to obtain lines of interest from coverage report files.

        Will verify that the source file is within the project tree, relative
        to the coverage directory.
        """
        coverage_dir = os.path.join(self.root, 'cover')
        for name in fnmatch.filter(os.listdir(coverage_dir), "*.html"):
                if name == 'index.html':
                    continue
                with open(os.path.join(coverage_dir, name)) as cover_file:
                    src_file, line_ranges = self.determine_coverage(cover_file)
                if not src_file:
                    continue
                src_file = os.path.abspath(os.path.join(self.root, src_file))
                if os.path.isfile(src_file):
                    yield (src_file, line_ranges)
                else:
                    raise SourceNotFound(
                        "Source file %(file)s not found at %(area)s" %
                        {'file': os.path.basename(src_file),
                         'area': os.path.dirname(src_file)})
Generator to obtain lines of interest from coverage report files.

        Will verify that the source file is within the project tree, relative
        to the coverage directory.