t2
Browse files- dropbox_handler.py +1 -0
- main.py +2 -2
dropbox_handler.py
CHANGED
@@ -100,6 +100,7 @@ def restoreFile(dropboxFilename):
|
|
100 |
|
101 |
def backupFolder(localFolder):
|
102 |
""" list all files in folder and subfolder and upload them"""
|
|
|
103 |
filenames=[]
|
104 |
for (root,dirs,files) in os.walk(localFolder, topdown=True):
|
105 |
print(root)
|
|
|
100 |
|
101 |
def backupFolder(localFolder):
|
102 |
""" list all files in folder and subfolder and upload them"""
|
103 |
+
print("backup folder called for ",localFolder)
|
104 |
filenames=[]
|
105 |
for (root,dirs,files) in os.walk(localFolder, topdown=True):
|
106 |
print(root)
|
main.py
CHANGED
@@ -141,9 +141,9 @@ def walk(path: PathRequest):
|
|
141 |
try:
|
142 |
for root, items, files in os.walk(path.dir,topdown=True):
|
143 |
for item in items:
|
144 |
-
response
|
145 |
except Exception:
|
146 |
-
print("got exception")
|
147 |
return response
|
148 |
|
149 |
@app.get(api_base+"/heartbeat")
|
|
|
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")
|