diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-13 14:58:05 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-13 14:58:05 -0400 |
commit | a03fde3ea32d3eb2cadb443454749111dda1797f (patch) | |
tree | 6984ab73962c8384905915da6c0a26d77778f3a3 /src/lib/Bcfg2/Server/Plugin/base.py | |
parent | fbf6edf62b7b105abb467ef5cb9254eb8f5396c6 (diff) | |
download | bcfg2-a03fde3ea32d3eb2cadb443454749111dda1797f.tar.gz bcfg2-a03fde3ea32d3eb2cadb443454749111dda1797f.tar.bz2 bcfg2-a03fde3ea32d3eb2cadb443454749111dda1797f.zip |
do not create data directories for plugins that don't need them
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin/base.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/base.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/base.py b/src/lib/Bcfg2/Server/Plugin/base.py index ecd970b54..c825a57b5 100644 --- a/src/lib/Bcfg2/Server/Plugin/base.py +++ b/src/lib/Bcfg2/Server/Plugin/base.py @@ -87,6 +87,10 @@ class Plugin(Debuggable): #: alphabetically by their name. sort_order = 500 + #: Whether or not to automatically create a data directory for + #: this plugin + create = True + #: List of names of methods to be exposed as XML-RPC functions __rmi__ = Debuggable.__rmi__ @@ -107,7 +111,7 @@ class Plugin(Debuggable): self.Entries = {} self.core = core self.data = os.path.join(datastore, self.name) - if not os.path.exists(self.data): + if self.create and not os.path.exists(self.data): self.logger.warning("%s: %s does not exist, creating" % (self.name, self.data)) os.makedirs(self.data) |