Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions misc-tools/import-contest.in
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ if os.path.exists('problems.yaml') or os.path.exists('problems.json') or os.path
confirmIndividually = dj_utils.confirm("Confirm individually for every problem", False)
for problem in problems:
print(f'\nPreparing problem \'{problem}\'.')
if os.path.exists(f'{problem}.zip'):
os.unlink(f'{problem}.zip')
if not os.path.isdir(problem) or not os.path.isfile(f'{problem}/problem.yaml'):
print('Problem directory not found or doesn\'t contain a problem.yaml.')
exit(3)
if os.path.exists(f'{problem}.zip'):
os.unlink(f'{problem}.zip')
zip_command = f"zip -r '../{problem}' -- .timelimit *"
process = subprocess.Popen(zip_command, cwd=problem, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, shell=True)

Expand Down
Loading