def _get(stage, p, info, cache, metric, persist): parsed = urlparse(p) if parsed.scheme == "remote": name = Config.SECTION_REMOTE_FMT.format(parsed.netloc) sect = stage.repo.config.config[name] remote = Remote(stage.repo, sect) return OUTS_MAP[remote.scheme]( stage, p, info, cache=cache, remote=remote, metric=metric, persist=persist, ) for o in OUTS: if o.supported(p): return o(stage, p, info, cache=cache, remote=None, metric=metric) return OutputLOCAL( stage, p, info, cache=cache, remote=None, metric=metric, persist=persist, )
def _get(stage, p, info, cache, metric, persist=False, tags=None): parsed = urlparse(p) if parsed.scheme == "remote": settings = stage.repo.config.get_remote_settings(parsed.netloc) remote = Remote(stage.repo, settings) return OUTS_MAP[remote.scheme]( stage, p, info, cache=cache, remote=remote, metric=metric, persist=persist, tags=tags, ) for o in OUTS: if o.supported(p): return o( stage, p, info, cache=cache, remote=None, metric=metric, persist=persist, tags=tags, ) return OutputLOCAL( stage, p, info, cache=cache, remote=None, metric=metric, persist=persist, tags=tags, )