Skip to content

Commit

Permalink
Make it possible to keep ID as is on repository adoption
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sandakov committed Jul 24, 2024
1 parent 96a7224 commit 1c37b76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pleskdistup/common/src/leapp_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def is_repo_ok(
return True


def adopt_repositories(repofile: str, ignore: typing.Optional[typing.List[str]] = None) -> None:
def adopt_repositories(repofile: str, ignore: typing.Optional[typing.List[str]] = None, keep_id: bool = False) -> None:
if ignore is None:
ignore = []

Expand All @@ -195,7 +195,9 @@ def adopt_repositories(repofile: str, ignore: typing.Optional[typing.List[str]]

log.debug("Adopt repository with id '{id}' is extracted.".format(id=id))

id = _do_id_replacement(id)
if not keep_id:
id = _do_id_replacement(id)

name = _do_name_replacement(name)
if url is not None:
url = _do_url_replacement(url)
Expand Down

0 comments on commit 1c37b76

Please sign in to comment.