diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-01-14 14:12:56 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-17 11:32:19 +0000 |
commit | 8088caeff5bf4ee9279b47a69c9f1e5537909601 (patch) | |
tree | d41b94e1982a4a97ffdaab8717c4ee26da3aca5d /scripts/lib/wic/plugins/source/isoimage-isohybrid.py | |
parent | b46da0731e3f7016d0ab2a67967f07c7e199f219 (diff) | |
download | openembedded-core-contrib-8088caeff5bf4ee9279b47a69c9f1e5537909601.tar.gz |
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 <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins/source/isoimage-isohybrid.py')
-rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 9472d8abb9..9ad0bc7c9b 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py @@ -64,13 +64,11 @@ class IsoImagePlugin(SourcePlugin): else: splashline = "" - options = creator.ks.handler.bootloader.appendLine - - timeout = kickstart.get_timeout(creator.ks, 10) + bootloader = creator.ks.bootloader syslinux_conf = "" syslinux_conf += "PROMPT 0\n" - syslinux_conf += "TIMEOUT %s \n" % timeout + syslinux_conf += "TIMEOUT %s \n" % (bootloader.timeout or 10) syslinux_conf += "\n" syslinux_conf += "ALLOWOPTIONS 1\n" syslinux_conf += "SERIAL 0 115200\n" @@ -82,7 +80,8 @@ class IsoImagePlugin(SourcePlugin): kernel = "/bzImage" syslinux_conf += "KERNEL " + kernel + "\n" - syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" % options + syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \ + % bootloader.append msger.debug("Writing syslinux config %s/ISO/isolinux/isolinux.cfg" \ % cr_workdir) @@ -100,14 +99,13 @@ class IsoImagePlugin(SourcePlugin): else: splashline = "" - options = creator.ks.handler.bootloader.appendLine + bootloader = creator.ks.bootloader grubefi_conf = "" grubefi_conf += "serial --unit=0 --speed=115200 --word=8 " grubefi_conf += "--parity=no --stop=1\n" grubefi_conf += "default=boot\n" - timeout = kickstart.get_timeout(creator.ks, 10) - grubefi_conf += "timeout=%s\n" % timeout + grubefi_conf += "timeout=%s\n" % (bootloader.timeout or 10) grubefi_conf += "\n" grubefi_conf += "search --set=root --label %s " % part.label grubefi_conf += "\n" @@ -116,7 +114,7 @@ class IsoImagePlugin(SourcePlugin): kernel = "/bzImage" grubefi_conf += "linux %s rootwait %s\n" \ - % (kernel, options) + % (kernel, bootloader.append) grubefi_conf += "initrd /initrd \n" grubefi_conf += "}\n" |