From 0cc9e01803957eb20738d58a005ca0624235478c Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 29 Jul 2011 15:19:04 +0200 Subject: [PATCH] watcher: Reformat constants Make them match with style guide. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/watcher/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py index 98f8d70aa..b7e42bf36 100644 --- a/lib/watcher/__init__.py +++ b/lib/watcher/__init__.py @@ -51,14 +51,19 @@ from ganeti.watcher import state MAXTRIES = 5 -BAD_STATES = [constants.INSTST_ERRORDOWN] -HELPLESS_STATES = [constants.INSTST_NODEDOWN, constants.INSTST_NODEOFFLINE] -NOTICE = 'NOTICE' -ERROR = 'ERROR' # Global LUXI client object client = None +BAD_STATES = frozenset([ + constants.INSTST_ERRORDOWN, + ]) +HELPLESS_STATES = frozenset([ + constants.INSTST_NODEDOWN, + constants.INSTST_NODEOFFLINE, + ]) +NOTICE = "NOTICE" +ERROR = "ERROR" class NotMasterError(errors.GenericError): -- GitLab