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