- Add lottery and plain round robin cpu policies. I didn't test
them extensively, mind you. Closes task #14. - Added documentation for each cpu policy - Manage extra-exception into PythonCPUPolicy (when the .py file doesn't contain a similarly named class) - Update exception output in GuiBuilder to make it slightly more descriptive git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@983 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
ff95a5364d
commit
ad774067e1
8 changed files with 135 additions and 13 deletions
|
@ -61,7 +61,9 @@ PythonCPUPolicy::PythonCPUPolicy(const char* name) throw(MalformedPolicyExceptio
|
|||
|
||||
// Now takes the user-defined policy class from pUserCPUPolicyDict
|
||||
PyObject* pCPUPolicyClass = PyDict_GetItemString(_upolicy_dict, name);
|
||||
assert(pCPUPolicyClass); // FIXME needs stricter checking and exception throwing
|
||||
if (pCPUPolicyClass == NULL)
|
||||
throw MalformedPolicyException(Glib::ustring(_("Cannot find a class named ")) +
|
||||
name + _(" into the corresponding .py file."));
|
||||
|
||||
// Retrieve a description for the policy using the __doc__ attribute
|
||||
PyObject* pDescriptionString = PyObject_GetAttrString(pCPUPolicyClass, "__doc__");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue