(cls, bootloader: str, skip_boot: bool)
| 47 | |
| 48 | @classmethod |
| 49 | def from_arg(cls, bootloader: str, skip_boot: bool) -> Self: |
| 50 | # to support old configuration files |
| 51 | bootloader = bootloader.capitalize() |
| 52 | |
| 53 | bootloader_options = [e.value for e in cls if e != cls.NO_BOOTLOADER or skip_boot is True] |
| 54 | |
| 55 | if bootloader not in bootloader_options: |
| 56 | values = ', '.join(bootloader_options) |
| 57 | warn(f'Invalid bootloader value "{bootloader}". Allowed values: {values}') |
| 58 | sys.exit(1) |
| 59 | |
| 60 | return cls(bootloader) |
| 61 | |
| 62 | |
| 63 | class PlymouthTheme(Enum): |
no test coverage detected