Correctly detect failure to work out the current version of bongo available

This commit is contained in:
alexhudson
2007-05-26 16:04:11 +00:00
parent 2afed3c5d5
commit af437b25d9
2 changed files with 8 additions and 4 deletions
+5 -3
View File
@@ -601,9 +601,11 @@ msgapi_GetAvailableVersion(PyObject *self, PyObject *args)
{
int version;
MsgGetAvailableVersion (&version);
return Py_BuildValue("i", version);
if (MsgGetAvailableVersion (&version)) {
return Py_BuildValue("i", version);
} else {
return Py_BuildValue("i", 0);
}
}
extern PyObject *msgapi_GetConfigProperty(PyObject *, PyObject *);