Some issues at Guided.py (#878)

* Solves issue #873 (error by key sys-language
Now disk_layouts file contents are loaded before calling the menu

* Solves issue #873 (error by key sys-language. Solution in previous commit was still too restrictive
This commit is contained in:
Werner Llácer 2022-01-18 20:57:30 +01:00 committed by GitHub
parent 3d30a4eb28
commit c776e30191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -163,10 +163,13 @@ def post_process_arguments(arguments):
load_plugin(arguments['plugin'])
if arguments.get('disk_layouts', None) is not None:
if 'disk_layouts' not in storage:
storage['disk_layouts'] = {}
if not json_stream_to_structure('--disk_layouts',arguments['disk_layouts'],storage['disk_layouts']):
# if 'disk_layouts' not in storage:
# storage['disk_layouts'] = {}
layout_storage = {}
if not json_stream_to_structure('--disk_layouts',arguments['disk_layouts'],layout_storage):
exit(1)
else:
arguments['disk_layouts'] = layout_storage
define_arguments()

View File

@ -240,7 +240,7 @@ class GlobalMenu:
self._process_selection(selection)
for key in self._menu_options:
sel = self._menu_options[key]
if sel.enabled and sel.has_selection() and key not in archinstall.arguments:
if key not in archinstall.arguments:
archinstall.arguments[key] = sel._current_selection
def _process_selection(self, selection):