summaryrefslogtreecommitdiffstats
path: root/booty
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-03-04 12:24:08 -0500
committerChris Lumens <clumens@redhat.com>2009-03-04 15:37:05 -0500
commit7f94ffba398ac4e6db7020e94cb5383cc03b8e89 (patch)
tree3aa6ae3dcf646be97dae8ad7703040acd947bdba /booty
parent4745aabcc0e3617aab9d734e7b3b160c1348d1f4 (diff)
downloadanaconda-7f94ffba398ac4e6db7020e94cb5383cc03b8e89.tar.gz
anaconda-7f94ffba398ac4e6db7020e94cb5383cc03b8e89.tar.xz
anaconda-7f94ffba398ac4e6db7020e94cb5383cc03b8e89.zip
Move BootyNoKernelWarning into __init__.py and use it.
Also, this gets rid of the goofy self.noKernelsWarn method which doesn't serve any useful purpose now that booty's part of anaconda.
Diffstat (limited to 'booty')
-rw-r--r--booty/__init__.py7
-rw-r--r--booty/alpha.py3
-rw-r--r--booty/bootloaderInfo.py16
-rw-r--r--booty/ia64.py3
-rw-r--r--booty/ppc.py3
-rw-r--r--booty/sparc.py3
-rw-r--r--booty/x86.py3
7 files changed, 18 insertions, 20 deletions
diff --git a/booty/__init__.py b/booty/__init__.py
index 0b1372ac3..328128fdf 100644
--- a/booty/__init__.py
+++ b/booty/__init__.py
@@ -20,6 +20,13 @@ import rhpl
from bootloaderInfo import *
from bootloader import *
+class BootyNoKernelWarning:
+ def __init__ (self, value=""):
+ self.value = value
+
+ def __str__ (self):
+ return self.value
+
# return instance of the appropriate bootloader for our arch
def getBootloader(storage):
"""Get the bootloader info object for your architecture"""
diff --git a/booty/alpha.py b/booty/alpha.py
index 29b284099..58008bea9 100644
--- a/booty/alpha.py
+++ b/booty/alpha.py
@@ -1,6 +1,7 @@
import os
import iutil
+from booty import BootyNoKernelWarning
from bootloaderInfo import *
import fsset
@@ -130,7 +131,7 @@ class alphaBootloaderInfo(bootloaderInfo):
def write(self, instRoot, bl, kernelList, chainList,
defaultDev, justConfig, intf):
if len(kernelList) < 1:
- self.noKernelsWarn(intf)
+ raise BootyNoKernelWarning
self.writeAboot(instRoot, bl, kernelList,
chainList, defaultDev, justConfig)
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index 0a32880ed..ec21d2b73 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -98,13 +98,6 @@ def getRootDevName(initrd, rootDevice):
except:
return rootDevice.path
-class BootyNoKernelWarning:
- def __init__ (self, value=""):
- self.value = value
-
- def __str__ (self):
- return self.value
-
class KernelArguments:
def get(self):
@@ -434,17 +427,10 @@ class bootloaderInfo:
defaultDev)
config.write(instRoot + self.configfile, perms = self.perms)
else:
- self.noKernelsWarn(intf)
+ raise booty.BootyNoKernelWarning
return ""
- # XXX in the future we also should do some validation on the config
- # file that's already there
- # XXX concept of the intf isn't very well defined outside of anaconda...
- # probably should just pass back up an error
- def noKernelsWarn(self, intf):
- raise BootyNoKernelWarning
-
def getArgList(self):
args = []
diff --git a/booty/ia64.py b/booty/ia64.py
index 2dcee97c0..013545fe6 100644
--- a/booty/ia64.py
+++ b/booty/ia64.py
@@ -1,3 +1,4 @@
+from booty import BootyNoKernelWarning
from bootloaderInfo import *
class ia64BootloaderInfo(efiBootloaderInfo):
@@ -25,7 +26,7 @@ class ia64BootloaderInfo(efiBootloaderInfo):
out = self.writeLilo(instRoot, bl, kernelList,
chainList, defaultDev, justConfig)
else:
- self.noKernelsWarn(intf)
+ raise BootyNoKernelWarning
self.removeOldEfiEntries(instRoot)
self.addNewEfiEntry(instRoot)
diff --git a/booty/ppc.py b/booty/ppc.py
index 23662b91f..5092c104d 100644
--- a/booty/ppc.py
+++ b/booty/ppc.py
@@ -1,6 +1,7 @@
import string
import os
+from booty import BootyNoKernelWarning
from bootloaderInfo import *
import fsset
import iutil
@@ -169,7 +170,7 @@ class ppcBootloaderInfo(bootloaderInfo):
out = self.writeYaboot(instRoot, bl, kernelList,
chainList, defaultDev, justConfig)
else:
- self.noKernelsWarn(intf)
+ raise BootyNoKernelWarning
def __init__(self, storage):
bootloaderInfo.__init__(self, storage)
diff --git a/booty/sparc.py b/booty/sparc.py
index 1eb53297f..f214a98e2 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -1,5 +1,6 @@
import os
+from booty import BootyNoKernelWarning
from bootloaderInfo import *
class sparcBootloaderInfo(bootloaderInfo):
@@ -116,7 +117,7 @@ class sparcBootloaderInfo(bootloaderInfo):
self.writeSilo(instRoot, bl, kernelList, chainList,
defaultDev, justConfig)
else:
- self.noKernelsWarn(intf)
+ raise BootyNoKernelWarning
def __init__(self, storage):
bootloaderInfo.__init__(self, storage)
diff --git a/booty/x86.py b/booty/x86.py
index 8bb77579f..2ef765fed 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -1,6 +1,7 @@
import os
import string
+from booty import BootyNoKernelWarning
from bootloaderInfo import *
import checkbootloader
import fsset
@@ -528,7 +529,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
return
if len(kernelList) < 1:
- self.noKernelsWarn(intf)
+ raise BootyNoKernelWarning
out = self.writeGrub(instRoot, bl, kernelList,
chainList, defaultDev,