The get_affinity and set_affinity routines currently raise SystemError exceptions for OS errors like "No such process" or "Operation not permitted." The SystemError exception is defined as an indication of a python interpreter bug. The right exception type for these is OSError.
Fixe in 4e05f75 at http://git.kernel.org/?p=linux/kernel/git/acme/python-schedutils.git