From 013ce4ae0f348a075d38512a611f6e90cfc49c54 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Fri, 29 Jul 2011 15:20:42 +0200
Subject: [PATCH] watcher: Raise error on unknown hook status

Also, remove punctuation from one error message.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/watcher/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py
index b7e42bf36..7ffbfe679 100644
--- a/lib/watcher/__init__.py
+++ b/lib/watcher/__init__.py
@@ -114,6 +114,9 @@ def RunWatcherHooks():
       else:
         logging.debug("Watcher hook %s: success (output: %s)", relname,
                       runresult.output)
+    else:
+      raise errors.ProgrammerError("Unknown status %s returned by RunParts",
+                                   status)
 
 
 class Instance(object):
@@ -517,7 +520,7 @@ def Main():
     logging.debug("Not master, exiting")
     return constants.EXIT_NOTMASTER
   except errors.ResolverError, err:
-    logging.error("Cannot resolve hostname '%s', exiting.", err.args[0])
+    logging.error("Cannot resolve hostname '%s', exiting", err.args[0])
     return constants.EXIT_NODESETUP_ERROR
   except errors.JobQueueFull:
     logging.error("Job queue is full, can't query cluster state")
-- 
GitLab