def mirror_url(self): if self.xom.is_replica(): url = self.xom.config.master_url return url.joinpath("%s/+simple/" % self.name).url else: url = URL(self.ixconfig['mirror_url']) return url.asdir().url
def __init__(self, xom, username, index, ixconfig): super(PyPIStage, self).__init__(xom, username, index, ixconfig) self.httpget = self.xom.httpget # XXX is requests/httpget multi-thread safe? self.cache_expiry = self.ixconfig.get( 'mirror_cache_expiry', xom.config.args.mirror_cache_expiry) self.xom = xom if xom.is_replica(): url = xom.config.master_url self.mirror_url = url.joinpath("%s/+simple/" % self.name).url else: url = URL(self.ixconfig['mirror_url']) self.mirror_url = url.asdir().url
def __init__(self, xom, username, index, ixconfig): super(PyPIStage, self).__init__(xom, username, index, ixconfig) self.httpget = self.xom.httpget # XXX is requests/httpget multi-thread safe? self.cache_expiry = self.ixconfig.get( 'mirror_cache_expiry', xom.config.args.mirror_cache_expiry) self.xom = xom self.offline = self.xom.config.args.offline_mode # list of locally mirrored projects self.key_projects = self.keyfs.PROJNAMES(user=username, index=index) if xom.is_replica(): url = xom.config.master_url self.mirror_url = url.joinpath("%s/+simple/" % self.name).url else: url = URL(self.ixconfig['mirror_url']) self.mirror_url = url.asdir().url