Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Oct 31, 2024
1 parent 7c42c43 commit 382153d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions template/server/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 382153d

Please sign in to comment.