pylib: common.i: Simplify error wrappers.

Make use of PyErr_SetFromErrno().