From 382153db9d4ea13e4c3ba399c7bcef68027b1e84 Mon Sep 17 00:00:00 2001 From: Jakub Novak Date: Wed, 30 Oct 2024 20:03:29 -0700 Subject: [PATCH] Clean up --- template/server/messaging.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/template/server/messaging.py b/template/server/messaging.py index 9193445..4f537aa 100644 --- a/template/server/messaging.py +++ b/template/server/messaging.py @@ -146,6 +146,10 @@ async def change_current_directory( request = self._get_execute_request( message_id, f"Deno.chdir('{path}')", True ) + elif language == "js": + request = self._get_execute_request( + message_id, f"process.chdir('{path}')", True + ) elif language == "r": request = self._get_execute_request(message_id, f"setwd('{path}')", True) elif language == "java": @@ -216,9 +220,7 @@ async def _receive_message(self): async for message in self._ws: await self._process_message(json.loads(message)) except Exception as e: - logger.error( - f"WebSocket received error while receiving messages: {type(e)}: {str(e)}" - ) + logger.error(f"WebSocket received error while receiving messages: {str(e)}") async def _process_message(self, data: dict): """