Skip to content

Commit

Permalink
set_secret_for_plugin: use None for argument if not to be set
Browse files Browse the repository at this point in the history
  • Loading branch information
twaugh committed Jun 21, 2016
1 parent e470f04 commit 2128704
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions osbs/build/build_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def set_secret_for_plugin(self, plugin, secret):
})

# tag_and_push sets secret path for each registry separately
if plugin[1] != 'tag_and_push':
if plugin[2] is not None:
self.dj.dock_json_set_arg(*(plugin + (secret_path,)))
else:
logger.debug("not setting secret for unused plugin %s",
Expand Down Expand Up @@ -740,7 +740,11 @@ def render(self, validate=True):
('prebuild_plugins', 'add_filesystem', 'koji_ssl_certs_dir'):
self.spec.koji_certs_secret.value,

('postbuild_plugins', 'tag_and_push', 'secret'):
('postbuild_plugins', 'tag_and_push',
# Only set the secrets for the build, don't
# add the path to the plugin's
# configuration. This is done elsewhere.
None):
self.spec.registry_secrets.value})

if self.spec.pulp_secret.value:
Expand Down

0 comments on commit 2128704

Please sign in to comment.