diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-08-05 10:14:27 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-08-05 10:15:12 -0400 |
commit | daae9eb16806e3cafdccbe1e3e316b880d276347 (patch) | |
tree | 40b18c77b20b0df6a97b3159f974de93f7ebd9d6 /src | |
parent | 393f4bc548888ffbeb6e1484d9988a3a077db940 (diff) | |
download | bcfg2-daae9eb16806e3cafdccbe1e3e316b880d276347.tar.gz bcfg2-daae9eb16806e3cafdccbe1e3e316b880d276347.tar.bz2 bcfg2-daae9eb16806e3cafdccbe1e3e316b880d276347.zip |
made packages.conf optional
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Packages.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py index 9ae6cf2b5..a4fb713d4 100644 --- a/src/lib/Server/Plugins/Packages.py +++ b/src/lib/Server/Plugins/Packages.py @@ -784,7 +784,11 @@ class PackagesConfig(Bcfg2.Server.Plugin.FileBacked, def __init__(self, filename, fam): Bcfg2.Server.Plugin.FileBacked.__init__(self, filename) ConfigParser.SafeConfigParser.__init__(self) - fam.AddMonitor(filename, self) + # packages.conf isn't strictly necessary, so only set a + # monitor if it exists. if it gets added, that will require a + # server restart + if os.path.exists(filename): + fam.AddMonitor(filename, self) def Index(self): """ Build local data structures """ |