From 2dd9dcd17f8c9da3b1c80a83763540158e3c342b Mon Sep 17 00:00:00 2001 From: James Garner Date: Thu, 21 Nov 2024 16:44:48 +1300 Subject: [PATCH] feat: add the number of errors to the debug output in load_deb822 --- lib/charms/operator_libs_linux/v0/apt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/charms/operator_libs_linux/v0/apt.py b/lib/charms/operator_libs_linux/v0/apt.py index 7394cdb4..378ee8cb 100644 --- a/lib/charms/operator_libs_linux/v0/apt.py +++ b/lib/charms/operator_libs_linux/v0/apt.py @@ -1349,7 +1349,8 @@ def load_deb822(self, filename: str) -> None: if errors: logger.debug( - "the following errors were encountered when reading deb822 format sources:\n%s", + "the following %d error(s) were encountered when reading deb822 format sources:\n%s", + len(errors), "\n".join(str(e) for e in errors), )