summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/FileMonitor/Pseudo.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-07-18 15:08:28 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-07-18 15:08:38 -0400
commit14dc1773ce6cd110869d4957b2b9d4e3c2afd965 (patch)
tree4f4c987c1ab090230afd62d6fcff13f39b0c242b /src/lib/Bcfg2/Server/FileMonitor/Pseudo.py
parent4a9b9f9420ccdcbd5a0e79ca493ea85e4683f41e (diff)
downloadbcfg2-14dc1773ce6cd110869d4957b2b9d4e3c2afd965.tar.gz
bcfg2-14dc1773ce6cd110869d4957b2b9d4e3c2afd965.tar.bz2
bcfg2-14dc1773ce6cd110869d4957b2b9d4e3c2afd965.zip
made inotify FAM work. i think.
Diffstat (limited to 'src/lib/Bcfg2/Server/FileMonitor/Pseudo.py')
-rw-r--r--src/lib/Bcfg2/Server/FileMonitor/Pseudo.py4
1 files changed, 1 insertions, 3 deletions
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'))