From 791aecdf82791f5bc93674977b566ec3a806c3d4 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Mon, 25 Apr 2022 09:34:08 +0200 Subject: [PATCH] fix string templating (#261) * fix string templating * bump lib patches --- lib/charms/prometheus_k8s/v0/prometheus_remote_write.py | 4 ++-- lib/charms/prometheus_k8s/v0/prometheus_scrape.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/charms/prometheus_k8s/v0/prometheus_remote_write.py b/lib/charms/prometheus_k8s/v0/prometheus_remote_write.py index e4bf6813..e6c64700 100644 --- a/lib/charms/prometheus_k8s/v0/prometheus_remote_write.py +++ b/lib/charms/prometheus_k8s/v0/prometheus_remote_write.py @@ -33,7 +33,7 @@ # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 3 +LIBPATCH = 4 logger = logging.getLogger(__name__) @@ -1136,7 +1136,7 @@ def _apply_label_matcher(self, expression, topology): try: return self._exec(args) except Exception as e: - logger.debug('Applying the expression failed: "{}", falling back to the original', e) + logger.debug('Applying the expression failed: "%s", falling back to the original', e) return expression def _get_transformer_path(self) -> Optional[Path]: diff --git a/lib/charms/prometheus_k8s/v0/prometheus_scrape.py b/lib/charms/prometheus_k8s/v0/prometheus_scrape.py index ba1bdef1..89afdf2e 100644 --- a/lib/charms/prometheus_k8s/v0/prometheus_scrape.py +++ b/lib/charms/prometheus_k8s/v0/prometheus_scrape.py @@ -334,7 +334,7 @@ def _on_scrape_targets_changed(self, event): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 17 +LIBPATCH = 18 logger = logging.getLogger(__name__) @@ -2244,7 +2244,7 @@ def _apply_label_matcher(self, expression, topology): try: return self._exec(args) except Exception as e: - logger.debug('Applying the expression failed: "{}", falling back to the original', e) + logger.debug('Applying the expression failed: "%s", falling back to the original', e) return expression def _get_transformer_path(self) -> Optional[Path]: