mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 00:56:15 +01:00
Fix %(apihost)s in "build-root" option for osc chroot
Prevents a crash in osc chroot when %(apihost)s is defined in the "build-root" config option. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
This commit is contained in:
parent
1fd7eda7c3
commit
68670a7a83
@ -9,6 +9,7 @@ import conf
|
||||
import oscerr
|
||||
import sys
|
||||
import time
|
||||
import urlparse
|
||||
|
||||
from optparse import SUPPRESS_HELP
|
||||
|
||||
@ -5404,8 +5405,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
package = os.path.splitext(descr)[0]
|
||||
else:
|
||||
package = store_read_package('.')
|
||||
apihost = urlparse.urlsplit(self.get_api_url())[1]
|
||||
buildroot = os.environ.get('OSC_BUILD_ROOT', conf.config['build-root']) \
|
||||
% {'repo': repository, 'arch': arch, 'project': project, 'package': package}
|
||||
% {'repo': repository, 'arch': arch, 'project': project, 'package': package, 'apihost': apihost}
|
||||
if not os.path.isdir(buildroot):
|
||||
raise oscerr.OscIOError(None, '\'%s\' is not a directory' % buildroot)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user