From b9870f2e9293491a2f17b1c3bbd4e1bc2d505704 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 18 Sep 2012 15:04:04 -0400 Subject: fixed gamin issues with late daemonization --- src/lib/Bcfg2/Server/FileMonitor/Inotify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/Bcfg2/Server/FileMonitor/Inotify.py') diff --git a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py index 60e26587e..6a8fd0201 100644 --- a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py +++ b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py @@ -3,7 +3,6 @@ import os import sys import logging -import operator import pyinotify from Bcfg2.Compat import reduce from Bcfg2.Server.FileMonitor import Event @@ -11,6 +10,7 @@ from Bcfg2.Server.FileMonitor.Pseudo import Pseudo logger = logging.getLogger(__name__) + class Inotify(Pseudo, pyinotify.ProcessEvent): __priority__ = 1 action_map = {pyinotify.IN_CREATE: 'created', @@ -22,6 +22,7 @@ class Inotify(Pseudo, pyinotify.ProcessEvent): def __init__(self, ignore=None, debug=False): Pseudo.__init__(self, ignore=ignore, debug=debug) + pyinotify.ProcessEvent(self) self.event_filter = dict() self.watches_by_path = dict() # these are created in start() after the server is done forking @@ -53,7 +54,6 @@ class Inotify(Pseudo, pyinotify.ProcessEvent): try: watch = self.wm.watches[ievent.wd] except KeyError: - err = sys.exc_info()[1] logger.error("Error handling event for %s: Watch %s not found" % (ievent.pathname, ievent.wd)) return -- cgit v1.2.3-1-g7c22