Fix pkg test when no souces.list exists

This commit is contained in:
Daniel A. Wozniak 2025-01-05 23:38:01 -07:00 committed by Daniel Wozniak
parent f2046b3a71
commit c7220f13b9

View file

@ -87,6 +87,9 @@ def configure_loader_modules(minion_opts):
@pytest.fixture()
def revert_repo_file(tmp_path):
sources = pathlib.Path("/etc/apt/sources.list")
if not sources.exists():
sources.touch()
try:
repo_file = pathlib.Path("/etc") / "apt" / "sources.list"
backup = tmp_path / "repo_backup"