closes bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)

(cherry picked from commit 45a30af109f69a81576b87ea775863ba12d55316)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
3 files changed