installer: make sure cancel_func has a value (#612)
When using LMC to virt-install a system to an image, cancel_func is not provided in run_creator, causing a TypeError (NoneType object is not callable). Signed-off-by: Yuval Turgeman <yturgema@redhat.com> Resolves: rhbz#1684316
This commit is contained in:
parent
6b4b3d98a8
commit
3d376764d4
@ -566,7 +566,7 @@ def virt_install(opts, install_log, disk_img, disk_size, cancel_func=None):
|
|||||||
else:
|
else:
|
||||||
msg = "virt_install failed on line: %s" % log_monitor.server.error_line
|
msg = "virt_install failed on line: %s" % log_monitor.server.error_line
|
||||||
raise InstallError(msg)
|
raise InstallError(msg)
|
||||||
elif cancel_func():
|
elif cancel_func and cancel_func():
|
||||||
raise InstallError("virt_install canceled by cancel_func")
|
raise InstallError("virt_install canceled by cancel_func")
|
||||||
|
|
||||||
if opts.make_fsimage:
|
if opts.make_fsimage:
|
||||||
|
Loading…
Reference in New Issue
Block a user