From 79b5d34bd99943ec959dceb859cdc111a0b7eb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Hag=20L=C3=B8vstad?= Date: Thu, 6 Feb 2025 15:16:28 +0100 Subject: [PATCH] fix escaping of log messages --- carbontracker/components/component.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carbontracker/components/component.py b/carbontracker/components/component.py index 9f7d2d1..2c7d8a6 100644 --- a/carbontracker/components/component.py +++ b/carbontracker/components/component.py @@ -106,7 +106,7 @@ def collect_power_usage(self, epoch: int): # Only raise error if no measurements have been collected. if not self.power_usages[-1]: self.logger.err_critical( - r"Could not read CPU/DRAM energy consumption due to lack of read-permissions.\n\tPlease run the following command(s): \n\t\t" + r"\n\t\t".join(commands) + "Could not read CPU/DRAM energy consumption due to lack of read-permissions.\n\tPlease run the following command(s): \n\t\t" + "\n\t\t".join(commands) ) # Append zero measurement to avoid further errors. self.power_usages.append([0])