Commit 7bc48d08 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Fix return of find_mac() for multiprocessing: None instead of exit()

parent e96a486b
......@@ -150,11 +150,14 @@ def main2(chart_file, cam_file, cam_step_file, cam_complete_file, cam_strong_fil
previous_frontier_places = set()
while True:
frontier_places, min_steps = \
find_mac(mcla,
cam_file, cam_step_file, cam_complete_file,
steps, final_prop, start_prop, inv_prop)
try:
frontier_places, min_steps = \
find_mac(mcla,
cam_file, cam_step_file, cam_complete_file,
steps, final_prop, start_prop, inv_prop)
except TypeError:
# No new solution/not satisfiable
return
# Add theese frontier places to set of previous ones
# (tuple is hashable)
......@@ -177,6 +180,7 @@ def find_mac(mcla,
steps, final_prop, start_prop, inv_prop):
"""
list, min step
:return: None if there is no new Solution or if problem is not satisfiable.
"""
# Build query
query = MCLSimpleQuery(start_prop, inv_prop, final_prop)
......@@ -226,7 +230,7 @@ def find_mac(mcla,
return next_mac, min_step
else:
LOGGER.info(final_prop + ":: STOP the search! No more MAC.")
exit()
return
def detect_model_type(mclanalyser, filepath):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment