Skip to content

fix: register custom profiles imported from URL in ProfileHandler - #4855

Open
Kolgrim33 wants to merge 1 commit into
archlinux:masterfrom
Kolgrim33:fix/import-profile-from-url
Open

Kolgrim33 wants to merge 1 commit into
archlinux:masterfrom
Kolgrim33:fix/import-profile-from-url

Conversation

@Kolgrim33

Copy link
Copy Markdown

PR Description:

In ProfileHandler._import_profile_from_url(), after downloading and parsing the profile file via self._process_profile_file(filepath), self.remove_custom_profiles(profiles) was called to clear any existing profile with the same name, but self.add_custom_profiles(profiles) was missing (unlike the local file branch in parse_profile_config()).

Consequently, custom profiles imported from a URL in profile_config['path'] were never registered in self._profiles, causing self.get_profile_by_name(main) to return None.

This PR adds the missing self.add_custom_profiles(profiles) call and a unit test in tests/test_profile_url_import.py.

Tests and Checks

  • I have tested the code!

@Kolgrim33
Kolgrim33 requested a review from Torxed as a code owner October 25, 2026 17:14
In ProfileHandler._import_profile_from_url(), after processing the
downloaded profile file and calling self.remove_custom_profiles(profiles)
to replace any existing definition, self.add_custom_profiles(profiles)
was never called (unlike the local file path in parse_profile_config()).

As a result, profiles imported via a URL in profile_config['path'] were
never added to self._profiles and get_profile_by_name() returned None.

Call self.add_custom_profiles(profiles) after remove_custom_profiles().
@Kolgrim33
Kolgrim33 force-pushed the fix/import-profile-from-url branch from e2da1cd to fc826af Compare October 25, 2026 17:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants