diff --git a/lib/charms/operator_libs_linux/v0/apt.py b/lib/charms/operator_libs_linux/v0/apt.py index 92fa63d..a6cf907 100644 --- a/lib/charms/operator_libs_linux/v0/apt.py +++ b/lib/charms/operator_libs_linux/v0/apt.py @@ -983,7 +983,7 @@ def filename(self, fname: str) -> None: Args: fname: a filename to write the repository information to. """ - if not fname.endswith(".list") or fname.endswith(".sources"): + if not fname.endswith((".list", ".sources")): raise InvalidSourceError("apt source filenames should end in .list or .sources!") self._filename = fname