summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-04-02 11:48:22 -0400
committerChris Lumens <clumens@redhat.com>2008-04-02 11:48:36 -0400
commit2a568931477bef8811af6afe5c5392bf4dcc01a2 (patch)
tree9c23ea0268a53122c9dd4e91438911de091ee832 /kickstart.py
parent75e4010a2d257848e9fc6eb64d02ea1742ba6573 (diff)
downloadanaconda-2a568931477bef8811af6afe5c5392bf4dcc01a2.tar.gz
anaconda-2a568931477bef8811af6afe5c5392bf4dcc01a2.tar.xz
anaconda-2a568931477bef8811af6afe5c5392bf4dcc01a2.zip
Use a better test to see if a package group doesn't exist (#439922).
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py41
1 files changed, 21 insertions, 20 deletions
diff --git a/kickstart.py b/kickstart.py
index d990e9714..7f1b38470 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+from backend import NoSuchGroup
import iutil
import isys
import os
@@ -1005,26 +1006,26 @@ def selectPackages(anaconda):
default = True
optional = True
- num = anaconda.backend.selectGroup(grp.name, (default, optional))
-
- if ksdata.packages.handleMissing == KS_MISSING_IGNORE:
- continue
- if num > 0:
- continue
- rc = anaconda.intf.messageWindow(_("Missing Group"),
- _("You have specified that the "
- "group '%s' should be installed. "
- "This group does not exist. "
- "Would you like to continue or "
- "abort your installation?")
- %(grp.name,),
- type="custom",
- custom_buttons=[_("_Abort"),
- _("_Continue")])
- if rc == 0:
- sys.exit(1)
- else:
- pass
+ try:
+ anaconda.backend.selectGroup(grp.name, (default, optional))
+ except NoSuchGroup, e:
+ if ksdata.packages.handleMissing == KS_MISSING_IGNORE:
+ pass
+ else:
+ rc = anaconda.intf.messageWindow(_("Missing Group"),
+ _("You have specified that the "
+ "group '%s' should be installed. "
+ "This group does not exist. "
+ "Would you like to continue or "
+ "abort your installation?")
+ %(grp.name,),
+ type="custom",
+ custom_buttons=[_("_Abort"),
+ _("_Continue")])
+ if rc == 0:
+ sys.exit(1)
+ else:
+ pass
map(anaconda.backend.deselectPackage, ksdata.packages.excludedList)