From a2dc0953e9bf6607bbdf1a751a0a7b9643f3572b Mon Sep 17 00:00:00 2001 From: Bernardus Rendy <37468936+bernardusrendy@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:21:15 -0700 Subject: [PATCH] device_manager.py message incorrect --- alab_management/device_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alab_management/device_manager.py b/alab_management/device_manager.py index 4540a623..bd5ee87a 100644 --- a/alab_management/device_manager.py +++ b/alab_management/device_manager.py @@ -181,9 +181,10 @@ def callback_publish(channel, delivery_tag, props, response): or device_entry["status"] != DeviceTaskStatus.OCCUPIED.name or device_entry["task_id"] != ObjectId(task_id) ): + device_task_id = str(device_entry["task_id"]) raise PermissionError( f"Currently the task ({task_id}) " - f"does not occupy this device: {device}, which is currently occupied by task {task_id}" + f"does not occupy this device: {device}, which is currently occupied by task {device_task_id}" ) result = self._device_view.execute_command(device, method, *args, **kwargs)