anubhav77 commited on
Commit
9e15676
·
1 Parent(s): dbd6004
Files changed (1) hide show
  1. main.py +4 -1
main.py CHANGED
@@ -138,12 +138,15 @@ def raw_sql(raw_sql: RawSql):
138
  def walk(path: PathRequest):
139
  print("Received walk request")
140
  response= JSONResponse(content= {"dirs":[]})
 
141
  try:
142
  for root, items, files in os.walk(path.dir,topdown=True):
143
  for item in items:
144
- response['dirs'].append(item)
145
  except Exception:
146
  print("got exception",Exception)
 
 
147
  return response
148
 
149
  @app.get(api_base+"/heartbeat")
 
138
  def walk(path: PathRequest):
139
  print("Received walk request")
140
  response= JSONResponse(content= {"dirs":[]})
141
+ dirs=[]
142
  try:
143
  for root, items, files in os.walk(path.dir,topdown=True):
144
  for item in items:
145
+ dirs.append(item)
146
  except Exception:
147
  print("got exception",Exception)
148
+
149
+ response['dirs']=dirs
150
  return response
151
 
152
  @app.get(api_base+"/heartbeat")