cli: Fix exit code for building images
When spin-livemedia, image-build etc. start a task and watch it, they never return a correct exit value. Pungi relies on the exit code to determine if the task failed or not. Fixes: https://pagure.io/koji/issue/555 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
21b405b819
commit
4060e1c026
1 changed files with 4 additions and 4 deletions
|
|
@ -5206,7 +5206,7 @@ def handle_spin_livecd(options, session, args):
|
|||
" architecture, a build target, and a relative path to" +
|
||||
" a kickstart file."))
|
||||
assert False # pragma: no cover
|
||||
_build_image(options, task_options, session, args, 'livecd')
|
||||
return _build_image(options, task_options, session, args, 'livecd')
|
||||
|
||||
|
||||
# This handler is for spinning livemedia images
|
||||
|
|
@ -5266,7 +5266,7 @@ def handle_spin_livemedia(options, session, args):
|
|||
if task_options.lorax_url is not None and task_options.lorax_dir is None:
|
||||
parser.error(_('The "--lorax_url" option requires that "--lorax_dir" '
|
||||
'also be used.'))
|
||||
_build_image(options, task_options, session, args, 'livemedia')
|
||||
return _build_image(options, task_options, session, args, 'livemedia')
|
||||
|
||||
|
||||
# This handler is for spinning appliance images
|
||||
|
|
@ -5322,7 +5322,7 @@ def handle_spin_appliance(options, session, args):
|
|||
"an architecture, a build target, and a relative path" +
|
||||
" to a kickstart file."))
|
||||
assert False # pragma: no cover
|
||||
_build_image(options, task_options, session, args, 'appliance')
|
||||
return _build_image(options, task_options, session, args, 'appliance')
|
||||
|
||||
|
||||
def handle_image_build_indirection(options, session, args):
|
||||
|
|
@ -5588,7 +5588,7 @@ def handle_image_build(options, session, args):
|
|||
parser.error(
|
||||
_("You must specify --distro. Examples: Fedora-16, RHEL-6.4, " +
|
||||
"SL-6.4 or CentOS-6.4"))
|
||||
_build_image_oz(options, task_options, session, args)
|
||||
return _build_image_oz(options, task_options, session, args)
|
||||
|
||||
|
||||
def _build_image(options, task_opts, session, args, img_type):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue