Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lowrank committed Sep 1, 2024
1 parent c583420 commit 3f344f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def get_dirs(self):
if student_dir.endswith('.html'):
zip_link = extract_link(student_dir) + '/archive/refs/heads/main.zip'
r = requests.get(zip_link, allow_redirects=True, timeout=10)
open(
f'{os.path.join(self.submission_dir, Path(student_dir).stem)}.zip', 'wb')\
.write(r.content)
with open(
f'{os.path.join(self.submission_dir, Path(student_dir).stem)}.zip', 'wb') as f:
f.write(r.content)
student_dirs.add(f'{os.path.join(self.submission_dir, Path(student_dir).stem)}.zip')
return student_dirs

Expand Down

0 comments on commit 3f344f8

Please sign in to comment.