]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/python/network.c
python: Show country code that was invalid
[people/ms/libloc.git] / src / python / network.c
index f36b3393ff177747b77c762337cab04dea2f1b9d..91264dfe4730bf538bfed1d8f8f005ad45bfb1d6 100644 (file)
@@ -83,7 +83,8 @@ static int Network_set_country_code(NetworkObject* self, PyObject* value) {
        int r = loc_network_set_country_code(self->network, country_code);
        if (r) {
                if (r == -EINVAL)
-                       PyErr_SetString(PyExc_ValueError, "Invalid country code");
+                       PyErr_Format(PyExc_ValueError,
+                               "Invalid country code: %s", country_code);
 
                return -1;
        }