From 675bf1b7b9ced2bc403c9074bd2fcc7d4efe626a Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Mon, 22 Mar 2010 16:25:27 +0000
Subject: [PATCH] ganeti-confd: Call pyinotify flags correctly

The "apparently pylint was right" commit.

Although the pyinotify constants work on old distributions, they fail on
new ones, with new python. Fixing this by calling them in a way that
works everywhere.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 daemons/ganeti-confd | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/daemons/ganeti-confd b/daemons/ganeti-confd
index c79315942..290f61887 100755
--- a/daemons/ganeti-confd
+++ b/daemons/ganeti-confd
@@ -106,10 +106,8 @@ class ConfdInotifyEventHandler(pyinotify.ProcessEvent):
     # no need to call the parent's constructor
     self.watch_manager = watch_manager
     self.callback = callback
-    # pylint: disable-msg=E1103
-    # pylint for some reason doesn't see the below constants
-    self.mask = pyinotify.EventsCodes.IN_IGNORED | \
-                pyinotify.EventsCodes.IN_MODIFY
+    self.mask = pyinotify.EventsCodes.ALL_FLAGS["IN_IGNORED"] | \
+                pyinotify.EventsCodes.ALL_FLAGS["IN_MODIFY"]
     self.file = filename
     self.watch_handle = None
 
-- 
GitLab