summaryrefslogtreecommitdiffstats
path: root/bootloader.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-06-26 03:32:07 +0000
committerMatt Wilson <msw@redhat.com>2001-06-26 03:32:07 +0000
commite8f63574ba8f180d60985822954525bc909f9201 (patch)
treed045a078f47adecb624f6675ddbe147855bb078e /bootloader.py
parent36bfef5e7c9c453257d494c6c37be02f6b89fd64 (diff)
downloadanaconda-e8f63574ba8f180d60985822954525bc909f9201.tar.gz
anaconda-e8f63574ba8f180d60985822954525bc909f9201.tar.xz
anaconda-e8f63574ba8f180d60985822954525bc909f9201.zip
use tuple expansion instead of string addition - it's faster
Diffstat (limited to 'bootloader.py')
-rw-r--r--bootloader.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bootloader.py b/bootloader.py
index 3300ee46e..05c076435 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -176,7 +176,7 @@ class x86BootloaderInfo:
for (label, version) in kernelList:
kernelTag = "-" + version
- kernelFile = cfPath + "vmlinuz" + kernelTag
+ kernelFile = "%svmlinuz%s" (cfPath, kernelTag)
initrd = makeInitrd (kernelTag, instRoot)
@@ -188,7 +188,8 @@ class x86BootloaderInfo:
f.write('\n')
if os.access (instRoot + initrd, os.R_OK):
- f.write('\tinitrd %s\n' % (cfPath + 'initrd' + kernelTag + '.img'))
+ f.write('\tinitrd %sinitrd%s.img\n' % (cfPath, 'initrd',
+ kernelTag, '.img'))
for (label, device) in chainList:
f.write('title %s\n' % (label))
@@ -200,7 +201,7 @@ class x86BootloaderInfo:
f.close()
part = grubbyPartitionName(bootDev)
- prefix = grubbyPartitionName(bootDev) + "/" + grubPath
+ prefix = "%s/%s" % (grubbyPartitionName(bootDev), grubPath)
cmd = "root %s\ninstall %s/i386-pc/stage1 d (%s) %s/i386-pc/stage2 p %s%s/grub.conf" % \
(part, grubPath, grubbyDiskName(bl.getDevice()), grubPath,
part, grubPath)
@@ -418,7 +419,7 @@ def writeBootloader(intf, instRoot, fsset, bl, langs, comps):
plainLabelUsed = 0
for (version, nick) in comps.kernelVersionList():
if plainLabelUsed:
- kernelList.append(kernelLabel + "-" + nick, version)
+ kernelList.append("%s-%s" % (kernelLabel, nick), version)
else:
kernelList.append(kernelLabel, version)
plainLabelUsed = 1