diff options
Diffstat (limited to 'scripts/lib/wic/kickstart')
| -rw-r--r-- | scripts/lib/wic/kickstart/__init__.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/lib/wic/kickstart/__init__.py b/scripts/lib/wic/kickstart/__init__.py index 10959213d1..111723b133 100644 --- a/scripts/lib/wic/kickstart/__init__.py +++ b/scripts/lib/wic/kickstart/__init__.py | |||
| @@ -68,7 +68,7 @@ def read_kickstart(path): | |||
| 68 | 68 | ||
| 69 | return ks | 69 | return ks |
| 70 | 70 | ||
| 71 | def get_image_size(ks, default = None): | 71 | def get_image_size(ks, default=None): |
| 72 | __size = 0 | 72 | __size = 0 |
| 73 | for p in ks.handler.partition.partitions: | 73 | for p in ks.handler.partition.partitions: |
| 74 | if p.mountpoint == "/" and p.size: | 74 | if p.mountpoint == "/" and p.size: |
| @@ -78,40 +78,40 @@ def get_image_size(ks, default = None): | |||
| 78 | else: | 78 | else: |
| 79 | return default | 79 | return default |
| 80 | 80 | ||
| 81 | def get_image_fstype(ks, default = None): | 81 | def get_image_fstype(ks, default=None): |
| 82 | for p in ks.handler.partition.partitions: | 82 | for p in ks.handler.partition.partitions: |
| 83 | if p.mountpoint == "/" and p.fstype: | 83 | if p.mountpoint == "/" and p.fstype: |
| 84 | return p.fstype | 84 | return p.fstype |
| 85 | return default | 85 | return default |
| 86 | 86 | ||
| 87 | def get_image_fsopts(ks, default = None): | 87 | def get_image_fsopts(ks, default=None): |
| 88 | for p in ks.handler.partition.partitions: | 88 | for p in ks.handler.partition.partitions: |
| 89 | if p.mountpoint == "/" and p.fsopts: | 89 | if p.mountpoint == "/" and p.fsopts: |
| 90 | return p.fsopts | 90 | return p.fsopts |
| 91 | return default | 91 | return default |
| 92 | 92 | ||
| 93 | def get_timeout(ks, default = None): | 93 | def get_timeout(ks, default=None): |
| 94 | if not hasattr(ks.handler.bootloader, "timeout"): | 94 | if not hasattr(ks.handler.bootloader, "timeout"): |
| 95 | return default | 95 | return default |
| 96 | if ks.handler.bootloader.timeout is None: | 96 | if ks.handler.bootloader.timeout is None: |
| 97 | return default | 97 | return default |
| 98 | return int(ks.handler.bootloader.timeout) | 98 | return int(ks.handler.bootloader.timeout) |
| 99 | 99 | ||
| 100 | def get_kernel_args(ks, default = "ro rd.live.image"): | 100 | def get_kernel_args(ks, default="ro rd.live.image"): |
| 101 | if not hasattr(ks.handler.bootloader, "appendLine"): | 101 | if not hasattr(ks.handler.bootloader, "appendLine"): |
| 102 | return default | 102 | return default |
| 103 | if ks.handler.bootloader.appendLine is None: | 103 | if ks.handler.bootloader.appendLine is None: |
| 104 | return default | 104 | return default |
| 105 | return "%s %s" %(default, ks.handler.bootloader.appendLine) | 105 | return "%s %s" %(default, ks.handler.bootloader.appendLine) |
| 106 | 106 | ||
| 107 | def get_menu_args(ks, default = ""): | 107 | def get_menu_args(ks, default=""): |
| 108 | if not hasattr(ks.handler.bootloader, "menus"): | 108 | if not hasattr(ks.handler.bootloader, "menus"): |
| 109 | return default | 109 | return default |
| 110 | if ks.handler.bootloader.menus in (None, ""): | 110 | if ks.handler.bootloader.menus in (None, ""): |
| 111 | return default | 111 | return default |
| 112 | return "%s" % ks.handler.bootloader.menus | 112 | return "%s" % ks.handler.bootloader.menus |
| 113 | 113 | ||
| 114 | def get_default_kernel(ks, default = None): | 114 | def get_default_kernel(ks, default=None): |
| 115 | if not hasattr(ks.handler.bootloader, "default"): | 115 | if not hasattr(ks.handler.bootloader, "default"): |
| 116 | return default | 116 | return default |
| 117 | if not ks.handler.bootloader.default: | 117 | if not ks.handler.bootloader.default: |
