From 4ee91e99c239d4a86698085a48e90ee01fb52603 Mon Sep 17 00:00:00 2001 From: Aziz Berkay Yesilyurt Date: Tue, 21 May 2024 14:44:06 +0200 Subject: [PATCH] Update request message to indicate function name Closes https://github.com/OpenMined/Heartbeat/issues/1343 --- packages/syft/src/syft/service/request/request.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/syft/src/syft/service/request/request.py b/packages/syft/src/syft/service/request/request.py index 889491278e8..88f035de0bb 100644 --- a/packages/syft/src/syft/service/request/request.py +++ b/packages/syft/src/syft/service/request/request.py @@ -570,11 +570,14 @@ def approve( ) if message and metadata and metadata.show_warnings and not disable_warnings: prompt_warning_message(message=message, confirm=True) + msg = ( + "Approving request ", + f"on change {self.code.service_func_name} " if is_code_request else "", + f"for domain {api.node_name}", + ) - print(f"Approving request for domain {api.node_name}") + print("".join(msg)) res = api.services.request.apply(self.id, **kwargs) - # if isinstance(res, SyftSuccess): - return res def deny(self, reason: str) -> SyftSuccess | SyftError: