From 8088caeff5bf4ee9279b47a69c9f1e5537909601 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 14 Jan 2016 14:12:56 +0200 Subject: wic: get rid of get_timeout getter Used bootloader.timeout instead of kickstart.get_timeout getter. Accessing attributes instead of getting them with getters is more pythonic, shorter and readable. It also more consistent as most of partition and bootloader attributes are used this way. This change also takes care of appendLine bootloader attribute: it's renamed to bootloader.append attribute provided by new parser. Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- scripts/lib/wic/plugins/source/bootimg-pcbios.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'scripts/lib/wic/plugins/source/bootimg-pcbios.py') diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index 80c7dfb65e..255684b386 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py @@ -105,14 +105,9 @@ class BootimgPcbiosPlugin(SourcePlugin): else: splashline = "" - options = creator.ks.handler.bootloader.appendLine - syslinux_conf = "" syslinux_conf += "PROMPT 0\n" - timeout = kickstart.get_timeout(creator.ks) - if not timeout: - timeout = 0 - syslinux_conf += "TIMEOUT " + str(timeout) + "\n" + syslinux_conf += "TIMEOUT " + str(bootloader.timeout) + "\n" syslinux_conf += "\n" syslinux_conf += "ALLOWOPTIONS 1\n" syslinux_conf += "SERIAL 0 115200\n" @@ -126,7 +121,7 @@ class BootimgPcbiosPlugin(SourcePlugin): syslinux_conf += "KERNEL " + kernel + "\n" syslinux_conf += "APPEND label=boot root=%s %s\n" % \ - (creator.rootdev, options) + (creator.rootdev, bootloader.append) msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \ % cr_workdir) -- cgit 1.2.3-korg