If malloc fails, just throw a NoMemory exception rather than showing
"RuntimeError: Cannot allocate memory".
---
generator/generator.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/generator.ml b/generator/generator.ml
index c65a3bd..1c35da9 100755
--- a/generator/generator.ml
+++ b/generator/generator.ml
@@ -2905,7 +2905,7 @@ get_values (PyObject *v, py_set_values *ret)
ret->nr_values = len;
ret->values = malloc (len * sizeof (hive_set_value));
if (!ret->values) {
- PyErr_SetString (PyExc_RuntimeError, strerror (errno));
+ PyErr_NoMemory ();
return -1;
}
--
2.0.4