From 14dc1773ce6cd110869d4957b2b9d4e3c2afd965 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 18 Jul 2012 15:08:28 -0400 Subject: made inotify FAM work. i think. --- src/lib/Bcfg2/Server/FileMonitor/Pseudo.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lib/Bcfg2/Server/FileMonitor/Pseudo.py') diff --git a/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py b/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py index baff871d0..089d4cf0f 100644 --- a/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py +++ b/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py @@ -1,7 +1,6 @@ """ Pseudo provides static monitor support for file alteration events """ import os -import stat import logging from Bcfg2.Server.FileMonitor import FileMonitor, Event @@ -14,9 +13,8 @@ class Pseudo(FileMonitor): """add a monitor to path, installing a callback to obj.HandleEvent""" if handleID is None: handleID = len(list(self.handles.keys())) - mode = os.stat(path)[stat.ST_MODE] self.events.append(Event(handleID, path, 'exists')) - if stat.S_ISDIR(mode): + if os.path.isdir(path): dirList = os.listdir(path) for includedFile in dirList: self.events.append(Event(handleID, includedFile, 'exists')) -- cgit v1.2.3-1-g7c22