Ramesh-vani commited on
Commit
e305ac4
·
verified ·
1 Parent(s): c67376c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -27,13 +27,13 @@ async def delete_item(websocket, project_name, path, connected):
27
  elif os.path.isfile(item_path):
28
  os.remove(item_path) # Remove the file
29
 
30
- websockets.broadcast(connected,{'success': True})
31
  else:
32
  print('item not found')
33
- websockets.broadcast(connected,{'success': False, 'message': 'Item not found'})
34
  except Exception as e:
35
- print(e)
36
- websockets.broadcast(connected,{'success': False, 'message': str(e)})
37
 
38
  async def create_file(websocket, project_name, path, connected):
39
  file_path = os.path.join(os.getcwd(), 'projects', project_name, path)
 
27
  elif os.path.isfile(item_path):
28
  os.remove(item_path) # Remove the file
29
 
30
+ websockets.broadcast(connected,'success')
31
  else:
32
  print('item not found')
33
+ websockets.broadcast(connected,'Item not found'})
34
  except Exception as e:
35
+ # print(e)
36
+ websockets.broadcast(connected,str(e))
37
 
38
  async def create_file(websocket, project_name, path, connected):
39
  file_path = os.path.join(os.getcwd(), 'projects', project_name, path)