From b5555422e83ffe06db10f7463b47d8954200ce1b Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Wed, 27 Oct 2021 11:45:38 +0200 Subject: [PATCH] L2SS-460: DO not use args in logs, as not to confuse our pyTango logger --- devices/clients/attribute_wrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/clients/attribute_wrapper.py b/devices/clients/attribute_wrapper.py index e55a66214..e025d56d3 100644 --- a/devices/clients/attribute_wrapper.py +++ b/devices/clients/attribute_wrapper.py @@ -154,7 +154,7 @@ class attribute_wrapper(attribute): try: self.read_function, self.write_function = client.setup_attribute(self.comms_annotation, self) except Exception as e: - raise Exception("Exception while setting %s attribute with annotation: '%s'", client.__class__.__name__, self.comms_annotation) from e + raise Exception(f"Exception while setting {client.__class__.__name__} attribute with annotation: {self.comms_annotation}") from e async def async_set_comm_client(self, client): """ @@ -163,7 +163,7 @@ class attribute_wrapper(attribute): try: self.read_function, self.write_function = await client.setup_attribute(self.comms_annotation, self) except Exception as e: - raise Exception("Exception while setting %s attribute with annotation: '%s'", client.__class__.__name__, self.comms_annotation) from e + raise Exception(f"Exception while setting {client.__class__.__name__} attribute with annotation: {self.comms_annotation}") from e def set_pass_func(self): def pass_func(value=None): -- GitLab