diff options
author | Chris Lumens <clumens@redhat.com> | 2005-11-16 20:15:34 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-11-16 20:15:34 +0000 |
commit | 59ad1518d5001649acbdb9a152286925f4f100c4 (patch) | |
tree | a3462dec1c722e834f633b646cc943fceea1a0f1 /kickstart.py | |
parent | 927b4aa94e49c969578cf017b197572f178fddd5 (diff) | |
download | anaconda-59ad1518d5001649acbdb9a152286925f4f100c4.tar.gz anaconda-59ad1518d5001649acbdb9a152286925f4f100c4.tar.xz anaconda-59ad1518d5001649acbdb9a152286925f4f100c4.zip |
Don't give a progress bar if there aren't any scripts to run.
Diffstat (limited to 'kickstart.py')
-rw-r--r-- | kickstart.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/kickstart.py b/kickstart.py index b2e84c47a..e0c7aaafa 100644 --- a/kickstart.py +++ b/kickstart.py @@ -657,28 +657,36 @@ class Kickstart(BaseInstallClass): partitions.autoPartitionRequests.append(request) def runPreScripts(self, intf = None): + preScripts = filter (lambda s: s.type == KS_SCRIPT_PRE, + self.ksdata.scripts) + + if len(preScripts) == 0: + return + log.info("Running kickstart %%pre script(s)") if intf is not None: w = intf.waitWindow(_("Running..."), _("Running pre-install scripts")) - for script in filter (lambda s: s.type == KS_SCRIPT_PRE, - self.ksdata.scripts): - script.run("/", self.serial, intf) + map (lambda s: s.run("/", self.serial, intf), preScripts) log.info("All kickstart %%pre script(s) have been run") if intf is not None: w.pop() def postAction(self, rootPath, serial, intf = None): + postScripts = filter (lambda s: s.type == KS_SCRIPT_POST, + self.ksdata.scripts) + + if len(postScripts) == 0: + return + log.info("Running kickstart %%post script(s)") if intf is not None: w = intf.waitWindow(_("Running..."), _("Running post-install scripts")) - for script in filter (lambda s: s.type == KS_SCRIPT_POST, - self.ksdata.scripts): - script.run(rootPath, serial, intf) + map (lambda s: s.run(rootPath, serial, intf), postScripts) log.info("All kickstart %%post script(s) have been run") if intf is not None: |