From 235c1190b003b8f69ff344d6e2ac31f4bd1d0ba2 Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Sat, 6 May 2023 16:09:58 +1000 Subject: Fix 1763 (#1790) * Fix 1763 --------- Co-authored-by: Daniel Girtler --- archinstall/default_profiles/profile.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'archinstall/default_profiles/profile.py') diff --git a/archinstall/default_profiles/profile.py b/archinstall/default_profiles/profile.py index c7d6b3dc..b1ad1f50 100644 --- a/archinstall/default_profiles/profile.py +++ b/archinstall/default_profiles/profile.py @@ -1,6 +1,5 @@ from __future__ import annotations -from dataclasses import dataclass from enum import Enum, auto from typing import List, Optional, Any, Dict, TYPE_CHECKING, TypeVar @@ -43,20 +42,6 @@ class SelectResult(Enum): ResetCurrent = auto() -@dataclass -class ProfileInfo: - name: str - details: Optional[str] - gfx_driver: Optional[str] = None - greeter: Optional[str] = None - - @property - def absolute_name(self) -> str: - if self.details is not None: - return self.details - return self.name - - class Profile: def __init__( self, @@ -72,6 +57,8 @@ class Profile: self.name = name self.description = description self.profile_type = profile_type + self.custom_settings: Dict[str, Any] = {} + self._support_gfx_driver = support_gfx_driver self._support_greeter = support_greeter @@ -135,6 +122,14 @@ class Profile: """ return SelectResult.NewSelection + def set_custom_settings(self, settings: Dict[str, Any]): + """ + Set the custom settings for the profile. + This is also called when the settings are parsed from the config + and can be overriden to perform further actions based on the profile + """ + self.custom_settings = settings + def current_selection_names(self) -> List[str]: if self._current_selection: return [s.name for s in self._current_selection] -- cgit v1.2.3-70-g09d2