From 10e689d49ad861c4acda4260f5b23e4d9c4e2a09 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 22 Mar 2010 16:15:46 +0100 Subject: [PATCH] Watcher: do not warn for missing hooks dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the hooks dir does not exist, do not warn needlessly. This is similar to commit a9b7e346 (for backend.py). Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: RenΓ© Nussbaumer <rn@google.com> --- daemons/ganeti-watcher | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemons/ganeti-watcher b/daemons/ganeti-watcher index 6bac44128..050e78953 100755 --- a/daemons/ganeti-watcher +++ b/daemons/ganeti-watcher @@ -87,6 +87,8 @@ def RunWatcherHooks(): """ hooks_dir = utils.PathJoin(constants.HOOKS_BASE_DIR, constants.HOOKS_NAME_WATCHER) + if not os.path.isdir(hooks_dir): + return try: results = utils.RunParts(hooks_dir) -- GitLab