Fix options.update is not 'all' if no config

If the user does not have 'update' in their configuration
ensure we are properly defaulting to 'all' and not None.

Change-Id: I65ddc49066119db0947801203ac88cb69153d1b0
Signed-off-by: Thanh Ha <zxiiro@linux.com>
This commit is contained in:
Thanh Ha 2018-09-19 09:46:14 -04:00
parent 9399b1f986
commit 18a321d510
No known key found for this signature in database
GPG Key ID: B0CB27E00DA095AA
1 changed files with 3 additions and 2 deletions

View File

@ -94,8 +94,9 @@ class JenkinsJobs(object):
# Note: CLI options override config file options.
if getattr(self.options, 'update', None) is None:
self.options.update = str(self.jjb_config.builder.get('update',
'all'))
self.options.update = self.jjb_config.builder.get('update')
if self.options.update is None:
self.options.update = 'all'
if getattr(self.options, 'plugins_info_path', None) is not None:
with io.open(self.options.plugins_info_path, 'r',