client: don't do g_criticals

Also, be a bit more careful about the layers of errors. Just don't do this:

   (process:236): nmcli-CRITICAL **: Error: Could not create NMClient object:
     Permissions request failed: Authorization check failed:
     The name org.freedesktop.PolicyKit1 was not provided by any .service files.
This commit is contained in:
Lubomir Rintel 2016-10-12 12:30:41 +00:00
parent 2dd384c817
commit 7279ea1317

View file

@ -520,7 +520,7 @@ nmc_get_client (NmCli *nmc)
if (!nmc->client) {
nmc->client = nm_client_new (NULL, &error);
if (!nmc->client) {
g_critical (_("Error: Could not create NMClient object: %s."), error->message);
g_printerr ("%s\n", error->message);
g_clear_error (&error);
exit (NMC_RESULT_ERROR_UNKNOWN);
}