Ramesh-vani commited on
Commit
2573531
·
verified ·
1 Parent(s): 61c18ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,9 +31,9 @@ async def execute_command(websocket, project_name, command):
31
  # Send the command output to the client
32
  output, error = process.communicate()
33
  response = f"Command executed:\n\nOutput:\n{output.decode('utf-8')}\nError:\n{error.decode('utf-8')}"
34
- websockets.broadcast(connected, response)
35
  except Exception as e:
36
- websockets.broadcast(connected, e)
37
 
38
  async def create_file_structure(websocket, data, base_path='.'):
39
  if data['type'] == 'folder':
 
31
  # Send the command output to the client
32
  output, error = process.communicate()
33
  response = f"Command executed:\n\nOutput:\n{output.decode('utf-8')}\nError:\n{error.decode('utf-8')}"
34
+ await websocket.send(response)
35
  except Exception as e:
36
+ await websocket.send(e)
37
 
38
  async def create_file_structure(websocket, data, base_path='.'):
39
  if data['type'] == 'folder':