def fetch_versions(self):
        try:
            iterator = self.repo.iter_milestones
        except __HOLE__:
            iterator = self.repo.milestones
        for version in iterator():
            logger.debug("Fetching version %s: %s" % (version.number,
                                                      version.title))
            version_data = {}
            version_data['source_id'] = version.number
            version_data['name'] = version.title
            if getattr(version, 'state', None):
                version_data['status'] = version.state
            yield version_data
dataset/ETHPy150Open redhat-cip/software-factory/tools/sfmigration/sfmigration/issues/github.py/GithubImporter.fetch_versions