mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 13:38:43 +02:00
keyfile,config: use nm_keyfile_error_is_not_found() helper
This commit is contained in:
parent
df27164d5e
commit
e08bb66b34
1 changed files with 2 additions and 6 deletions
|
|
@ -1622,9 +1622,7 @@ parity_good:
|
||||||
out_err:
|
out_err:
|
||||||
if (!err)
|
if (!err)
|
||||||
return;
|
return;
|
||||||
if ( err->domain == G_KEY_FILE_ERROR
|
if (nm_keyfile_error_is_not_found (err)) {
|
||||||
&& NM_IN_SET (err->code, G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
|
||||||
G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
|
|
||||||
/* ignore such errors. The key is not present. */
|
/* ignore such errors. The key is not present. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3154,9 +3152,7 @@ read_one_setting_value (KeyfileReaderInfo *info,
|
||||||
g_return_if_reached ();
|
g_return_if_reached ();
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
if ( err->domain == G_KEY_FILE_ERROR
|
if (nm_keyfile_error_is_not_found (err)) {
|
||||||
&& NM_IN_SET (err->code, G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
|
||||||
G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
|
|
||||||
/* ignore such errors. The key is not present. */
|
/* ignore such errors. The key is not present. */
|
||||||
} else {
|
} else {
|
||||||
handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN,
|
handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue