From 8f0bca00c014cfb38397ee4fe71e82dd26bc5d86 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 7 Feb 2018 16:32:24 -0800 Subject: [PATCH] Pass the callback_func through novirt_install to execWithRedirect The default is no callback. --- src/pylorax/installer.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pylorax/installer.py b/src/pylorax/installer.py index 9b76e213..1cd0d464 100644 --- a/src/pylorax/installer.py +++ b/src/pylorax/installer.py @@ -234,7 +234,7 @@ class VirtualInstall( object ): # Undefine the virt, UEFI installs need to have --nvram passed 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 """ @@ -285,7 +285,7 @@ def novirt_install(opts, disk_img, disk_size, repo_url): # Make sure anaconda has the right product and release os.environ["ANACONDA_PRODUCTNAME"] = opts.project 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 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: raise InstallError("virt_install failed") - - -