diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index 9f9ea0577..acd73deb8 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -1424,7 +1424,7 @@ static PyMethodDef PGF_methods[] = { {"exprProbability", (PyCFunction)PGF_exprProbability, METH_VARARGS, "Returns the probability of an expression" }, - {"checkoutBranch", (PyCFunction)PGF_checkoutBranch, METH_VARARGS, + {"checkoutBranch", (PyCFunction)PGF_checkoutBranch, METH_NOARGS, "Checks out the latest branch of the repository" }, {"newTransaction", (PyCFunction)PGF_newTransaction, METH_VARARGS, diff --git a/src/runtime/python/transactions.c b/src/runtime/python/transactions.c index d585c3170..585b931b8 100644 --- a/src/runtime/python/transactions.c +++ b/src/runtime/python/transactions.c @@ -10,20 +10,12 @@ PyObject * PGF_checkoutBranch(PGFObject *self, PyObject *args) { - if (!PyArg_ParseTuple(args, "")) - return NULL; - PgfExn err; PgfRevision rev = pgf_checkout_revision(self->db, &err); if (handleError(err) != PGF_EXN_NONE) { return NULL; } - if (rev == 0) { - // is this possible? - PyErr_SetString(PyExc_KeyError, "unknown branch name"); - return NULL; - } pgf_free_revision(self->db, self->revision); self->revision = rev;