Pass the callback_func through novirt_install to execWithRedirect
The default is no callback.
This commit is contained in:
parent
f1d8b10867
commit
8f0bca00c0
@ -234,7 +234,7 @@ class VirtualInstall( object ):
|
|||||||
# Undefine the virt, UEFI installs need to have --nvram passed
|
# Undefine the virt, UEFI installs need to have --nvram passed
|
||||||
subprocess.call(["virsh", "undefine", self.virt_name, "--nvram"])
|
subprocess.call(["virsh", "undefine", self.virt_name, "--nvram"])
|
||||||
|
|
||||||
def novirt_install(opts, disk_img, disk_size, repo_url):
|
def novirt_install(opts, disk_img, disk_size, repo_url, callback_func=None):
|
||||||
"""
|
"""
|
||||||
Use Anaconda to install to a disk image
|
Use Anaconda to install to a disk image
|
||||||
"""
|
"""
|
||||||
@ -285,7 +285,7 @@ def novirt_install(opts, disk_img, disk_size, repo_url):
|
|||||||
# Make sure anaconda has the right product and release
|
# Make sure anaconda has the right product and release
|
||||||
os.environ["ANACONDA_PRODUCTNAME"] = opts.project
|
os.environ["ANACONDA_PRODUCTNAME"] = opts.project
|
||||||
os.environ["ANACONDA_PRODUCTVERSION"] = opts.releasever
|
os.environ["ANACONDA_PRODUCTVERSION"] = opts.releasever
|
||||||
rc = execWithRedirect("anaconda", args)
|
rc = execWithRedirect("anaconda", args, callback_func=callback_func)
|
||||||
|
|
||||||
# Move the anaconda logs over to a log directory
|
# Move the anaconda logs over to a log directory
|
||||||
log_dir = os.path.abspath(os.path.dirname(opts.logfile))
|
log_dir = os.path.abspath(os.path.dirname(opts.logfile))
|
||||||
@ -408,6 +408,3 @@ def virt_install(opts, install_log, disk_img, disk_size):
|
|||||||
|
|
||||||
if rc:
|
if rc:
|
||||||
raise InstallError("virt_install failed")
|
raise InstallError("virt_install failed")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user