Пример #1
0
 def add(self, repo):
     # :api
     id_ = repo.id
     if id_ in self:
         msg = 'Repository %s is listed more than once in the configuration'
         raise ConfigError(msg % id_)
     msg = repo._valid()
     if msg:
         raise ConfigError(msg)
     self[id_] = repo
Пример #2
0
 def add(self, repo):
     # :api
     id_ = repo.id
     if id_ in self:
         msg = 'Repository %s is listed more than once in the configuration'
         raise ConfigError(msg % id_)
     try:
         repo._repo.verify()
     except RuntimeError as e:
         raise ConfigError("{0}".format(e))
     self[id_] = repo