Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -184,26 +184,26 @@ async def exe(websocket,connected):
|
|
| 184 |
try:
|
| 185 |
if event["command"]["type"]=="shell":
|
| 186 |
await execute_command(websocket, event["project_name"], event["command"]["command"], connected)
|
| 187 |
-
elif "write"
|
| 188 |
|
| 189 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected)
|
| 190 |
-
elif "create"
|
| 191 |
if event["item"]=="folder":
|
| 192 |
await create_folder(websocket, event["project_name"], event["path"], connected)
|
| 193 |
else:
|
| 194 |
await create_file(websocket, event["project_name"], event["path"], connected)
|
| 195 |
|
| 196 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected) #Todo
|
| 197 |
-
elif "delete"
|
| 198 |
|
| 199 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected) #Todo
|
| 200 |
-
elif "rename"
|
| 201 |
|
| 202 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected) #Todo
|
| 203 |
|
| 204 |
else:
|
| 205 |
# First player starts a new game.
|
| 206 |
-
|
| 207 |
except RuntimeError as exc:
|
| 208 |
# Send an "error" event if the move was illegal.
|
| 209 |
await error(websocket, str(exc))
|
|
|
|
| 184 |
try:
|
| 185 |
if event["command"]["type"]=="shell":
|
| 186 |
await execute_command(websocket, event["project_name"], event["command"]["command"], connected)
|
| 187 |
+
elif event["command"]["type"]=="write":
|
| 188 |
|
| 189 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected)
|
| 190 |
+
elif event["command"]["type"]=="create":
|
| 191 |
if event["item"]=="folder":
|
| 192 |
await create_folder(websocket, event["project_name"], event["path"], connected)
|
| 193 |
else:
|
| 194 |
await create_file(websocket, event["project_name"], event["path"], connected)
|
| 195 |
|
| 196 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected) #Todo
|
| 197 |
+
elif event["command"]["type"]=="delete":
|
| 198 |
|
| 199 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected) #Todo
|
| 200 |
+
elif event["command"]["type"]=="rename":
|
| 201 |
|
| 202 |
await wirte_file(websocket, event["project_name"], event["path"], event["content"], connected) #Todo
|
| 203 |
|
| 204 |
else:
|
| 205 |
# First player starts a new game.
|
| 206 |
+
pass
|
| 207 |
except RuntimeError as exc:
|
| 208 |
# Send an "error" event if the move was illegal.
|
| 209 |
await error(websocket, str(exc))
|