minor fixes for pr749

This commit is contained in:
wmayer
2017-05-11 19:47:54 +02:00
parent ca3e58e2f3
commit b77d8cac4f
2 changed files with 6 additions and 3 deletions

View File

@@ -346,9 +346,12 @@ PyObject* DocumentPy::openTransaction(PyObject *args)
cmd = PyString_AsString(value);
}
#endif
else
else {
PyErr_SetString(PyExc_TypeError, "string or unicode expected");
return NULL;
getDocumentPtr()->openTransaction(cmd.c_str());
}
getDocumentPtr()->openTransaction(cmd.c_str());
Py_Return;
}