Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework profiles path #3040

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions archinstall/lib/profile/profiles_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from ..hardware import GfxDriver
from ..networking import fetch_data_from_url, list_interfaces
from ..output import debug, error, info
from ..storage import storage
from .profile_model import ProfileConfiguration

if TYPE_CHECKING:
Expand All @@ -29,7 +28,6 @@

class ProfileHandler:
def __init__(self) -> None:
self._profiles_path: Path = storage['PROFILE']
self._profiles: list[Profile] | None = None

# special variable to keep track of a profile url configuration
Expand Down Expand Up @@ -346,8 +344,9 @@ def _find_available_profiles(self) -> list[Profile]:
"""
Search the profile path for profile definitions
"""
profiles_path = Path(__file__).parents[2] / 'default_profiles'
profiles = []
for file in self._profiles_path.glob('**/*.py'):
for file in profiles_path.glob('**/*.py'):
# ignore the abstract default_profiles class
if 'profile.py' in file.name:
continue
Expand Down
1 change: 0 additions & 1 deletion archinstall/lib/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Any

storage: dict[str, Any] = {
'PROFILE': Path(__file__).parent.parent.joinpath('default_profiles'),
'LOG_PATH': Path('/var/log/archinstall'),
'LOG_FILE': Path('install.log'),
'MOUNT_POINT': Path('/mnt/archinstall'),
Expand Down
Loading