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

Update canvas_sync.py to ignore for .gitkeep

parent f224ce37
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,11 @@ while len(folders) > 0: ...@@ -33,9 +33,11 @@ while len(folders) > 0:
ospath = os.path.join(GITLAB_FOLDER_NAME, *path) ospath = os.path.join(GITLAB_FOLDER_NAME, *path)
print("Searching {}".format(ospath)) print("Searching {}".format(ospath))
for f in os.listdir(ospath): for f in os.listdir(ospath):
if f == ".gitkeep":
continue
gitlabpath = os.path.join(ospath, f) gitlabpath = os.path.join(ospath, f)
canvaspath = "/".join([CANVAS_BASE_PATH, CANVAS_FOLDER_NAME, *path, f])
if os.path.isdir(gitlabpath): if os.path.isdir(gitlabpath):
canvaspath = "/".join([CANVAS_BASE_PATH, CANVAS_FOLDER_NAME, *path, f])
nfolder = next((folder for folder in course.get_folders() nfolder = next((folder for folder in course.get_folders()
if folder.full_name == canvaspath), None) if folder.full_name == canvaspath), None)
print("{} is a folder, found {} on canvas".format(gitlabpath, nfolder)) print("{} is a folder, found {} on canvas".format(gitlabpath, nfolder))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment