add try/except block around subprocess

This commit is contained in:
Maximilian Keßler 2023-05-06 09:06:01 +02:00
parent 1172405994
commit 0e6067ffe3
Signed by: max
GPG key ID: BCC5A619923C0BA5
2 changed files with 28 additions and 23 deletions

View file

@ -1,6 +1,6 @@
import json
from site_api import get, api, replay
from sat import COLORS, solve_sat
from sat import solve_sat
from database import Game, store, load, commit, conn
from download_data import export_game
from variants import num_suits, VARIANTS, variant_name
@ -144,6 +144,7 @@ def solve_instance(num_players, deck):
def solve_seed(seed, num_players, deck_compressed, var_id):
try:
deck = decompress_deck(deck_compressed)
t0 = perf_counter()
solvable, solution, num_remaining_cards = solve_instance(num_players, deck)
@ -169,6 +170,9 @@ def solve_seed(seed, num_players, deck_compressed, var_id):
raise Exception("Programming Error")
mutex.release()
except Exception:
traceback.format_exc()
print("exception in subprocess:")
def solve_unknown_seeds():

View file

@ -4,3 +4,4 @@ pysmt
termcolor
more_itertools
psycopg2
alive_progress