diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-30 11:35:57 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-30 11:36:00 -0400 |
commit | 5b66845d01a507120503c19e40829c6394d47b93 (patch) | |
tree | 6111063e58990290f238297ea1b44b1b47924282 /src/lib | |
parent | 616bcab0374a4ac7f79e4a5101003ebfb820364e (diff) | |
download | bcfg2-5b66845d01a507120503c19e40829c6394d47b93.tar.gz bcfg2-5b66845d01a507120503c19e40829c6394d47b93.tar.bz2 bcfg2-5b66845d01a507120503c19e40829c6394d47b93.zip |
XMLFileBacked: always watch xincludes
In Bcfg2 1.3, XInclude'd files only got FAM watches if the parent file
was monitoring itself, and it got a FAM object passed to it. This led
to some ugly workarounds, and bugs -- you couldn't easily use XInclude
in Properties or Bundler, for instance, and have changes recognized.
Since FAM objects are now module-level, we can always monitor
XInclude'd files.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/helpers.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py index 38491b05d..7a3d887fe 100644 --- a/src/lib/Bcfg2/Server/Plugin/helpers.py +++ b/src/lib/Bcfg2/Server/Plugin/helpers.py @@ -597,17 +597,14 @@ class XMLFileBacked(FileBacked): Index.__doc__ = FileBacked.Index.__doc__ def add_monitor(self, fpath): - """ Add a FAM monitor to a file that has been XIncluded. This - is only done if the constructor got both a ``fam`` object and - ``should_monitor`` set to True. + """ Add a FAM monitor to a file that has been XIncluded. :param fpath: The full path to the file to monitor :type fpath: string :returns: None """ self.extra_monitors.append(fpath) - if self.should_monitor: - self.fam.AddMonitor(fpath, self) + self.fam.AddMonitor(fpath, self) def __iter__(self): return iter(self.entries) |