1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-12 23:56:13 +01:00

- do not crash on manual configured buildroot

This commit is contained in:
Adrian Schröter 2013-03-18 17:41:57 +01:00
parent 56979493d6
commit 948687c4cf

View File

@ -496,8 +496,11 @@ def main(apiurl, opts, argv):
pacname = os.path.splitext(build_descr)[0]
apihost = urlparse.urlsplit(apiurl)[1]
if not build_root:
build_root = config['build-root'] % {'repo': repo, 'arch': arch,
'project': prj, 'package': pacname, 'apihost': apihost}
try:
build_root = config['build-root'] % {'repo': repo, 'arch': arch,
'project': prj, 'package': pacname, 'apihost': apihost}
except:
build_root = config['build-root']
cache_dir = config['packagecachedir'] % {'apihost': apihost}