Use PyErr_NoMemory() rather than PyExc_MemoryError as the former actually
raises an exception. The latter is just a class and is then just an object
with no special meaning when returned.
Signed-off-by: David Howells <dhowells@redhat.com>
print PYOUT "\n";
print PYOUT "\tcall = rxrpc_alloc_call(z_conn->x, 0);\n";
print PYOUT "\tif (!call)\n";
- print PYOUT "\t\treturn PyExc_MemoryError;\n";
+ print PYOUT "\t\treturn PyErr_NoMemory();\n";
# Marshal the arguments
print PYOUT "\n";
print PYOUT "error_no_res:\n";
print PYOUT "\tif (errno == ENOMEM)\n";
print PYOUT "enomem:\n";
- print PYOUT "\t\tres = PyExc_MemoryError;\n";
+ print PYOUT "\t\tres = PyErr_NoMemory();\n";
print PYOUT "\telse if (errno == ECONNABORTED)\n";
print PYOUT "\t\tres = py_rxgen_received_abort(call);\n";
print PYOUT "\telse\n";