1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-23 13:31:48 +01:00

- do_localbuildlog: support %(apihost)s in build-root config setting

This commit is contained in:
Marcus Huewe 2014-08-04 11:14:48 +02:00
parent 7649481167
commit 902adde28b

View File

@ -5040,9 +5040,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
self.print_repos() self.print_repos()
raise oscerr.WrongArgs('Wrong number of arguments.') raise oscerr.WrongArgs('Wrong number of arguments.')
# TODO: refactor/unify buildroot calculation and move it to core.py
buildroot = os.environ.get('OSC_BUILD_ROOT', conf.config['build-root']) buildroot = os.environ.get('OSC_BUILD_ROOT', conf.config['build-root'])
apihost = urlsplit(self.get_api_url())[1]
buildroot = buildroot % {'project': project, 'package': package, buildroot = buildroot % {'project': project, 'package': package,
'repo': repo, 'arch': arch} 'repo': repo, 'arch': arch, 'apihost': apihost}
offset = 0 offset = 0
if opts.offset: if opts.offset:
offset = int(opts.offset) offset = int(opts.offset)