config: Combine disk name and path as tuple
This commit is contained in:
@@ -58,10 +58,9 @@ fallback_values = {
|
||||
'locale': 'en_US.UTF-8',
|
||||
'keyboard_language': ('en_US' 'English (US)'),
|
||||
'keyboard_layout': ('us', 'English (US)'),
|
||||
'disk_device_path': '/dev/null',
|
||||
'disk': ('/dev/null', 'Test Dummy'),
|
||||
'disk_is_partition': False,
|
||||
'disk_efi_partition': '/dev/null',
|
||||
'disk_name': 'Test Dummy'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,5 +28,6 @@ class ConfirmPage(Gtk.Box, Page):
|
||||
### public methods ###
|
||||
|
||||
def load(self):
|
||||
self.disk_row.set_title(config.get('disk_name'))
|
||||
self.disk_row.set_subtitle(config.get('disk_device_path'))
|
||||
name, path = config.get('disk')
|
||||
self.disk_row.set_title(name)
|
||||
self.disk_row.set_subtitle(path)
|
||||
|
||||
@@ -77,8 +77,7 @@ class PartitionPage(Gtk.Box, Page):
|
||||
self.disk_size.set_label(self.disk.size_text)
|
||||
|
||||
def _store_device_info(self, info):
|
||||
config.set('disk_name', info.name)
|
||||
config.set('disk_device_path', info.device_path)
|
||||
config.set('disk', (info.device_path, info.name))
|
||||
config.set('disk_is_partition',
|
||||
not type(info) == type(self.disk))
|
||||
config.set('disk_efi_partition', self.disk.efi_partition)
|
||||
|
||||
@@ -37,7 +37,7 @@ def create_envs(installation_step: InstallationStep):
|
||||
envs += [
|
||||
f'OSI_LOCALE={_get("locale")}',
|
||||
f'OSI_KEYBOARD_LAYOUT={_get("keyboard_layout")}',
|
||||
f'OSI_DEVICE_PATH={_get("disk_device_path")}',
|
||||
f'OSI_DEVICE_PATH={_get("disk")}',
|
||||
f'OSI_DEVICE_IS_PARTITION={_get("disk_is_partition")}',
|
||||
f'OSI_DEVICE_EFI_PARTITION={_get("disk_efi_partition")}',
|
||||
f'OSI_USE_ENCRYPTION={_get("use_encryption")}',
|
||||
|
||||
Reference in New Issue
Block a user