propagate ptql error message to PyErr

This commit is contained in:
Doug MacEachern 2011-06-15 14:16:14 -07:00
parent 2f8090559e
commit e0ef7a3616
1 changed files with 4 additions and 0 deletions

View File

@ -151,6 +151,10 @@ static int pysigar_parse_pid(sigar_t *sigar, PyObject *args, long *pid)
PySigar_Croak();
}
}
else {
PyErr_SetString(PyExc_ValueError, error.message);
return !SIGAR_OK;
}
}
}