Skip to content

Commit

Permalink
fix: don't warn about key file on remove
Browse files Browse the repository at this point in the history
  • Loading branch information
james-garner-canonical committed Dec 4, 2024
1 parent d0674e9 commit 3745426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charms/operator_libs_linux/v0/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ def _add_repository(
) -> None:
line = _repo_to_line(repo, include_signed_by=False)
key_file = repo.gpg_key
if key_file and not os.path.exists(key_file):
if key_file and not remove and not os.path.exists(key_file):
msg = (
"Adding repository '{line}' with add-apt-repository."
" Key file '{key_file}' does not exist."
Expand Down

0 comments on commit 3745426

Please sign in to comment.