Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedamara1 authored Oct 18, 2020
1 parent 9535981 commit d95b1cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions automatingv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def download_annonc_files(announcements, course_name):
extension = (
os.path.splitext(file_name)
)[1] #the extension exists in second elemnts of returned tuple
print(extension)
path_str = os.path.join('./', course_name, file_name)

if (valid(extension[1:]) and not (path.exists(path_str))):
Expand All @@ -131,7 +130,7 @@ def download_annonc_files(announcements, course_name):
else:
print(file_name, "already exists")
except KeyError as e:
print("this announcement doesn't have any file to download")
continue


def download_works_files(works, course_name):
Expand All @@ -154,7 +153,7 @@ def download_works_files(works, course_name):
else:
print(file_name, "already exists")
except KeyError as e:
print("this work doesn't have any file to download")
continue


def valid(ch):
Expand Down

0 comments on commit d95b1cf

Please sign in to comment.