Skip to content

Commit 5f0a91c

Browse files
committed
Rework profiles path
1 parent a8c2a5a commit 5f0a91c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

archinstall/lib/profile/profiles_handler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ..hardware import GfxDriver
1515
from ..networking import fetch_data_from_url, list_interfaces
1616
from ..output import debug, error, info
17-
from ..storage import storage
1817
from .profile_model import ProfileConfiguration
1918

2019
if TYPE_CHECKING:
@@ -29,7 +28,6 @@
2928

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

3533
# special variable to keep track of a profile url configuration
@@ -346,8 +344,9 @@ def _find_available_profiles(self) -> list[Profile]:
346344
"""
347345
Search the profile path for profile definitions
348346
"""
347+
profiles_path = Path(__file__).parents[2] / 'default_profiles'
349348
profiles = []
350-
for file in self._profiles_path.glob('**/*.py'):
349+
for file in profiles_path.glob('**/*.py'):
351350
# ignore the abstract default_profiles class
352351
if 'profile.py' in file.name:
353352
continue

archinstall/lib/storage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from typing import Any
1010

1111
storage: dict[str, Any] = {
12-
'PROFILE': Path(__file__).parent.parent.joinpath('default_profiles'),
1312
'LOG_PATH': Path('/var/log/archinstall'),
1413
'LOG_FILE': Path('install.log'),
1514
'MOUNT_POINT': Path('/mnt/archinstall'),

0 commit comments

Comments
 (0)