diff options
author | Thomas Haller <thaller@redhat.com> | 2019-05-23 08:47:07 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-05-27 12:01:09 +0200 |
commit | b4d678b31489fbc68840b7da87b3f2039007371f (patch) | |
tree | a7f6e150398c957b3077278061fe8bacfcdb2561 /dispatcher | |
parent | 8518a873873cb1f50b583685aaf6d51df2012e6b (diff) | |
download | NetworkManager-b4d678b31489fbc68840b7da87b3f2039007371f.tar.gz |
dispatcher: silence message about non-existing dispatcher directory
Silence messages like
find-scripts: Failed to open dispatcher directory '/usr/lib/NetworkManager/dispatcher.d': Error opening directory ā/usr/lib/NetworkManager/dispatcher.dā: No such file or directory
find-scripts: Failed to open dispatcher directory '/usr/lib/NetworkManager/dispatcher.d/pre-up.d': Error opening directory ā/usr/lib/NetworkManager/dispatcher.d/pre-up.dā: No such file or directory
Diffstat (limited to 'dispatcher')
-rw-r--r-- | dispatcher/nm-dispatcher.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dispatcher/nm-dispatcher.c b/dispatcher/nm-dispatcher.c index 6f49b67eec..4d9d47b3c6 100644 --- a/dispatcher/nm-dispatcher.c +++ b/dispatcher/nm-dispatcher.c @@ -597,8 +597,10 @@ _find_scripts (Request *request, GHashTable *scripts, const char *base, const ch dirname = g_build_filename (base, "dispatcher.d", subdir, NULL); if (!(dir = g_dir_open (dirname, 0, &error))) { - _LOG_R_W (request, "find-scripts: Failed to open dispatcher directory '%s': %s", - dirname, error->message); + if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { + _LOG_R_W (request, "find-scripts: Failed to open dispatcher directory '%s': %s", + dirname, error->message); + } g_error_free (error); return; } |