When dumping debug info after app script failure, be slightly smarter and stop at ynh_die to have more meaningul lines being shown

This commit is contained in:
Alexandre Aubin 2020-03-23 19:35:41 +01:00
parent de879e1d30
commit 8085b3a2c2

View file

@ -896,7 +896,7 @@ def dump_app_log_extract_for_debugging(operation_logger):
line = line.strip().split(": ", 1)[1] line = line.strip().split(": ", 1)[1]
lines_to_display.append(line) lines_to_display.append(line)
if line.endswith("+ ynh_exit_properly"): if line.endswith("+ ynh_exit_properly") or " + ynh_die " in line:
break break
elif len(lines_to_display) > 20: elif len(lines_to_display) > 20:
lines_to_display.pop(0) lines_to_display.pop(0)