Skip to content

Commit 19c4613

Browse files
Ignore error while running envgen (#74)
* ignore errors This reverts commit 78c6f8c. * output errors
1 parent 78ef191 commit 19c4613

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

atcodertools/tools/envgen.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import shutil
66
import sys
7+
import traceback
78
from multiprocessing import Pool, cpu_count
89
from os.path import expanduser
910
from time import sleep
@@ -218,7 +219,12 @@ def prepare_contest(atcoder_client: AtCoderClient,
218219
thread_pool.map(func, tasks)
219220
else:
220221
for argv in tasks:
221-
func(argv)
222+
try:
223+
func(argv)
224+
except Exception:
225+
# Prevent the script from stopping
226+
print(traceback.format_exc(), file=sys.stderr)
227+
pass
222228

223229
if config.postprocess_config.exec_cmd_on_contest_dir is not None:
224230
contest_dir_path = os.path.join(workspace_root_path, contest_id)

0 commit comments

Comments
 (0)