Fix type error when kernel packages arent defined
authorEric Edgar <rocket@gentoo.org>
Fri, 27 Jan 2006 15:04:07 +0000 (15:04 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 27 Jan 2006 15:04:07 +0000 (15:04 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1050 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py

index e31baf6232832f91dbe5457a024a4b85a50df48e..d9b6f591fa2f33539c522fec03084a334bb69b0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.535 2006/01/27 14:45:21 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.536 2006/01/27 15:04:07 rocket Exp $
+
+  27 Jan 2006; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py:
+  Fix type error when kernel packages arent defined
 
   27 Jan 2006; Chris Gianelloni <wolf31o2@gentoo.org>
   examples/generic_stage_template.spec, examples/grp_template.spec,
index cf6631b7b20a5f4530bcd5f0b854f9418c240a6f..6d232426fa215cc064777953810ccb5b502fdc92 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.123 2006/01/26 19:56:32 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.124 2006/01/27 15:04:07 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -475,8 +475,9 @@ class generic_stage_target(generic_target):
                                self.valid_values.append("boot/kernel/"+x+"/aliases")
                                self.valid_values.append("boot/kernel/"+x+"/extraversion")
                                self.valid_values.append("boot/kernel/"+x+"/packages")
-                               if type(addlargs["boot/kernel/"+x+"/packages"]) == types.StringType:
-                                       addlargs["boot/kernel/"+x+"/packages"]=[addlargs["boot/kernel/"+x+"/packages"]]
+                               if addlargs.has_key("boot/kernel/"+x+"/packages"):
+                                       if type(addlargs["boot/kernel/"+x+"/packages"]) == types.StringType:
+                                               addlargs["boot/kernel/"+x+"/packages"]=[addlargs["boot/kernel/"+x+"/packages"]]
                                self.valid_values.append("boot/kernel/"+x+"/use")
                                self.valid_values.append("boot/kernel/"+x+"/gk_kernargs")
                                self.valid_values.append("boot/kernel/"+x+"/gk_action")