diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2016-08-09 20:53:50 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2018-10-18 16:20:14 +0200 |
commit | 3cf95064ad0f73cb2aeb471387ac8f2e87fe443f (patch) | |
tree | a5827250a051012bc26236441c819a92a070a479 /src/lib | |
parent | 6c3932c0d572ddf62178fa25af68ae56b77b80c6 (diff) | |
parent | 79838c23f2d9b2615c11fa460ed972ad6833c6fd (diff) | |
download | bcfg2-3cf95064ad0f73cb2aeb471387ac8f2e87fe443f.tar.gz bcfg2-3cf95064ad0f73cb2aeb471387ac8f2e87fe443f.tar.bz2 bcfg2-3cf95064ad0f73cb2aeb471387ac8f2e87fe443f.zip |
Merge branch 'add-directory-ignore' into HEAD
* add-directory-ignore:
Server: Ignore directories containing a .bcfg2-ignore file
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/helpers.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py index 762d018eb..ca0fe8188 100644 --- a/src/lib/Bcfg2/Server/Plugin/helpers.py +++ b/src/lib/Bcfg2/Server/Plugin/helpers.py @@ -456,7 +456,9 @@ class DirectoryBacked(Debuggable): # again without having to add a new monitor. elif os.path.isdir(abspath): # Deal with events for directories - if action in ['exists', 'created']: + if os.path.exists(os.path.join(abspath, '.bcfg2-ignore')): + self.logger.debug("Ignoring directory %s" % abspath) + elif action in ['exists', 'created']: self.add_directory_monitor(relpath) elif action == 'changed': if relpath in self.entries: |