summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Probes.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-30 11:35:46 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-01-17 10:44:14 -0500
commit45c7bbf24ae3c6530f33ebb33c062818ad44816d (patch)
treed39fbacaae2d712fdf250a9bce19f9737392539e /src/lib/Bcfg2/Server/Plugins/Probes.py
parenta6b269011b2f1e84c650239065e56778591f087e (diff)
downloadbcfg2-45c7bbf24ae3c6530f33ebb33c062818ad44816d.tar.gz
bcfg2-45c7bbf24ae3c6530f33ebb33c062818ad44816d.tar.bz2
bcfg2-45c7bbf24ae3c6530f33ebb33c062818ad44816d.zip
added a module-level FAM object to avoid passing it as an argument a billion times
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Probes.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Probes.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py
index f106b75a4..7b8ef2209 100644
--- a/src/lib/Bcfg2/Server/Plugins/Probes.py
+++ b/src/lib/Bcfg2/Server/Plugins/Probes.py
@@ -9,6 +9,7 @@ import operator
import lxml.etree
import Bcfg2.Server
import Bcfg2.Server.Plugin
+import Bcfg2.Server.FileMonitor
try:
from django.db import models
@@ -117,12 +118,12 @@ class ProbeSet(Bcfg2.Server.Plugin.EntrySet):
bangline = re.compile('^#!\s*(?P<interpreter>.*)$')
basename_is_regex = True
- def __init__(self, path, fam, encoding, plugin_name):
+ def __init__(self, path, encoding, plugin_name):
self.plugin_name = plugin_name
Bcfg2.Server.Plugin.EntrySet.__init__(self, '[0-9A-Za-z_\-]+', path,
Bcfg2.Server.Plugin.SpecificData,
encoding)
- fam.AddMonitor(path, self)
+ Bcfg2.Server.FileMonitor.get_fam().AddMonitor(path, self)
def HandleEvent(self, event):
""" handle events on everything but probed.xml """
@@ -178,7 +179,7 @@ class Probes(Bcfg2.Server.Plugin.Probing,
Bcfg2.Server.Plugin.DatabaseBacked.__init__(self, core, datastore)
try:
- self.probes = ProbeSet(self.data, core.fam, core.setup['encoding'],
+ self.probes = ProbeSet(self.data, core.setup['encoding'],
self.name)
except:
err = sys.exc_info()[1]