mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-15 18:16:13 +01:00
The 'build-jobs' config option should be an integer
This fixes the "config['build-jobs'] > 1" check in the build module.
This commit is contained in:
parent
8cb0246c10
commit
1a92c8b995
14
osc/conf.py
14
osc/conf.py
@ -201,6 +201,7 @@ boolean_opts = ['debug', 'do_package_tracking', 'http_debug', 'post_mortem', 'tr
|
|||||||
'request_show_source_buildstatus', 'review_inherit_group', 'use_keyring', 'gnome_keyring', 'no_verify', 'builtin_signature_check',
|
'request_show_source_buildstatus', 'review_inherit_group', 'use_keyring', 'gnome_keyring', 'no_verify', 'builtin_signature_check',
|
||||||
'http_full_debug', 'include_request_from_project', 'local_service_run', 'buildlog_strip_time', 'no_preinstallimage',
|
'http_full_debug', 'include_request_from_project', 'local_service_run', 'buildlog_strip_time', 'no_preinstallimage',
|
||||||
'status_mtime_heuristic']
|
'status_mtime_heuristic']
|
||||||
|
integer_opts = ['build-jobs']
|
||||||
|
|
||||||
api_host_options = ['user', 'pass', 'passx', 'aliases', 'http_headers', 'email', 'sslcertck', 'cafile', 'capath', 'trusted_prj']
|
api_host_options = ['user', 'pass', 'passx', 'aliases', 'http_headers', 'email', 'sslcertck', 'cafile', 'capath', 'trusted_prj']
|
||||||
|
|
||||||
@ -848,11 +849,14 @@ def get_config(override_conffile=None,
|
|||||||
config = dict(cp.items('general', raw=1))
|
config = dict(cp.items('general', raw=1))
|
||||||
config['conffile'] = conffile
|
config['conffile'] = conffile
|
||||||
|
|
||||||
for i in boolean_opts:
|
typed_opts = ((boolean_opts, cp.getboolean), (integer_opts, cp.getint))
|
||||||
try:
|
for opts, meth in typed_opts:
|
||||||
config[i] = cp.getboolean('general', i)
|
for opt in opts:
|
||||||
except ValueError as e:
|
try:
|
||||||
raise oscerr.ConfigError('cannot parse \'%s\' setting: ' % i + str(e), conffile)
|
config[opt] = meth('general', opt)
|
||||||
|
except ValueError as e:
|
||||||
|
msg = 'cannot parse \'%s\' setting: %s' % (opt, str(e))
|
||||||
|
raise oscerr.ConfigError(msg, conffile)
|
||||||
|
|
||||||
config['packagecachedir'] = os.path.expanduser(config['packagecachedir'])
|
config['packagecachedir'] = os.path.expanduser(config['packagecachedir'])
|
||||||
config['exclude_glob'] = config['exclude_glob'].split()
|
config['exclude_glob'] = config['exclude_glob'].split()
|
||||||
|
Loading…
Reference in New Issue
Block a user