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