summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-07-26 15:51:22 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-07-26 15:51:22 -0500
commit61766a5d46c15bb2b41eb07d822d04fb96ee8055 (patch)
treed436b7c2841b95e018bc55e72a6aa4941cac6c6b
parentd156bee41172992183abe73a54c97261f3597c92 (diff)
parent19d62c62ee44e7ef52cc6d1cdae3f98a7d65008f (diff)
downloadbcfg2-61766a5d46c15bb2b41eb07d822d04fb96ee8055.tar.gz
bcfg2-61766a5d46c15bb2b41eb07d822d04fb96ee8055.tar.bz2
bcfg2-61766a5d46c15bb2b41eb07d822d04fb96ee8055.zip
Merge branch 'master' of https://github.com/mikemccllstr/bcfg2
-rw-r--r--src/lib/Server/Plugin.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index a7ab9feab..a79fac0e1 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -376,9 +376,18 @@ class DirectoryBacked(object):
__child__ = FileBacked
patterns = re.compile('.*')
- def __init__(self, name, fam):
+ def __init__(self, data, fam):
+ """Initialize the DirectoryBacked object.
+
+ :param self: the object being initialized.
+ :param data: the path to the data directory that will be
+ monitored.
+ :param fam: The FileMonitor object used to receive
+ notifications of changes.
+ """
object.__init__(self)
- self.name = name
+
+ self.data = data
self.fam = fam
# self.entries contains information about the files monitored
@@ -488,7 +497,7 @@ class DirectoryBacked(object):
return
if not self.patterns.match(event.filename):
return
- self.entries[relpath] = self.__child__('%s/%s' % (self.name,
+ self.entries[relpath] = self.__child__('%s/%s' % (self.data,
relpath))
self.entries[relpath].HandleEvent(event)
elif action == 'changed':