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