class RepoMetadata: def __init__(self, repo): """ Parses the repomd.xml file existing in the given repo directory. """ self.repodir = os.path.abspath(repo) self.repomdxml = os.path.join(self.repodir, 'repomd.xml') self.compress_type = _available_compression[-1] # best available if not os.path.exists(self.repomdxml): raise MDError, '%s not found' % self.repomdxml try: self.repoobj = RepoMD(self.repodir) self.repoobj.parse(self.repomdxml) except RepoMDError, e: raise MDError, 'Could not parse %s' % self.repomdxml
class RepoMetadata: def __init__(self, repo): """ Parses the repomd.xml file existing in the given repo directory. """ self.repodir = os.path.abspath(repo) self.repomdxml = os.path.join(self.repodir, 'repomd.xml') self.checksum_type = 'sha256' if not os.path.exists(self.repomdxml): raise MDError, '%s not found' % self.repomdxml try: self.repoobj = RepoMD(self.repodir) self.repoobj.parse(self.repomdxml) except RepoMDError, e: raise MDError, 'Could not parse %s' % self.repomdxml
class RepoMetadata: def __init__(self, repo): """ Parses the repomd.xml file existing in the given repo directory. """ self.repodir = os.path.abspath(repo) self.repomdxml = os.path.join(self.repodir, 'repomd.xml') self.checksum_type = 'sha256' self.compress = False self.compress_type = 'xz' if not os.path.exists(self.repomdxml): raise MDError, '%s not found' % self.repomdxml try: self.repoobj = RepoMD(self.repodir) self.repoobj.parse(self.repomdxml) except RepoMDError, e: raise MDError, 'Could not parse %s' % self.repomdxml