Skip to content

Commit

Permalink
spec: raise OsbsValidationException when no registries specified
Browse files Browse the repository at this point in the history
  • Loading branch information
twaugh committed Apr 5, 2016
1 parent 19854eb commit 71bcf06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osbs/build/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ def set_params(self, sources_command=None, architecture=None, vendor=None,
# or, if no source registry is set, the first listed registry
imagestream_reg = self.source_registry_uri.value
if not imagestream_reg:
imagestream_reg = self.registry_uris.value[0]
try:
imagestream_reg = self.registry_uris.value[0]
except IndexError:
raise OsbsValidationException("No registries specified")

self.imagestream_url.value = os.path.join(imagestream_reg.docker_uri,
name_label)
Expand Down

0 comments on commit 71bcf06

Please sign in to comment.