Simplifying the profile loading a bit, and adding some debugging for it.
This commit is contained in:
parent
03a69eba2e
commit
758b12e674
|
|
@ -188,9 +188,9 @@ def select_profile(options):
|
||||||
if '__name__' in source_data and '_prep_function' in source_data:
|
if '__name__' in source_data and '_prep_function' in source_data:
|
||||||
with profile.load_instructions(namespace=f"{selected_profile}.py") as imported:
|
with profile.load_instructions(namespace=f"{selected_profile}.py") as imported:
|
||||||
if hasattr(imported, '_prep_function'):
|
if hasattr(imported, '_prep_function'):
|
||||||
return profile, imported
|
return imported
|
||||||
|
|
||||||
return selected_profile
|
return profile
|
||||||
|
|
||||||
raise RequirementError("Selecting profiles require a least one profile to be given as an option.")
|
raise RequirementError("Selecting profiles require a least one profile to be given as an option.")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@ else:
|
||||||
archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']]
|
archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']]
|
||||||
|
|
||||||
# Check the potentially selected profiles preperations to get early checks if some additional questions are needed.
|
# Check the potentially selected profiles preperations to get early checks if some additional questions are needed.
|
||||||
|
print(archinstall.arguments['profile'])
|
||||||
if archinstall.arguments['profile']:
|
if archinstall.arguments['profile']:
|
||||||
if not archinstall.arguments['profile']._prep_function():
|
if not archinstall.arguments['profile']._prep_function():
|
||||||
archinstall.log(
|
archinstall.log(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue