X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpython%2Fdatabase.c;fp=src%2Fpython%2Fdatabase.c;h=ed222759102b5b2ae5bb44c5c5c2447630320b1e;hb=c98ebf8aae2aa141193db52cd9429b1ded5b09c4;hp=38a804cd8a8936e925601498f0c52c3fc1e3f6b5;hpb=248f5e0419f2349253b8ea96e477c15649fe2173;p=people%2Fms%2Flibloc.git diff --git a/src/python/database.c b/src/python/database.c index 38a804c..ed22275 100644 --- a/src/python/database.c +++ b/src/python/database.c @@ -325,9 +325,14 @@ static PyObject* Database_search_networks(DatabaseObject* self, PyObject* args, loc_country_unref(country); } - loc_database_enumerator_set_countries(enumerator, countries); + r = loc_database_enumerator_set_countries(enumerator, countries); + if (r) { + PyErr_SetFromErrno(PyExc_SystemError); + + loc_as_list_unref(countries); + return NULL; + } - Py_DECREF(country_codes); loc_country_list_unref(countries); }