Skip to content
Snippets Groups Projects
Commit aed14a82 authored by Albin Heimerson's avatar Albin Heimerson
Browse files

change message

parent ccc801fc
No related branches found
No related tags found
No related merge requests found
......@@ -31,18 +31,18 @@ folders = [(pdf_folder, ())]
while len(folders) > 0:
folder, path = folders.pop()
ospath = os.path.join(GITLAB_FOLDER_NAME, *path)
print("Looking in folder {}".format(ospath))
print("Searching {}".format(ospath))
for f in os.listdir(ospath):
gitlabpath = os.path.join(ospath, f)
canvaspath = "/".join([CANVAS_BASE_PATH, CANVAS_FOLDER_NAME, *path, f])
if os.path.isdir(gitlabpath):
nfolder = next((folder for folder in course.get_folders()
if folder.full_name == canvaspath), None)
print("{} is folder, found {} on canvas".format(gitlabpath, nfolder))
print("{} is a folder, found {} on canvas".format(gitlabpath, nfolder))
if nfolder is None:
print("Creating new canvas folder.")
nfolder = folder.create_folder(f)
folders.append((nfolder, tuple([*path, f])))
else:
print("{} is file, uploading!".format(gitlabpath))
print("{} is a file, uploading!".format(gitlabpath))
folder.upload(gitlabpath)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment