[PATCH AUTOSEL 5.15 1/3] scripts: handle BrokenPipeError for python scripts