summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-05 10:14:27 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-05 10:15:12 -0400
commitdaae9eb16806e3cafdccbe1e3e316b880d276347 (patch)
tree40b18c77b20b0df6a97b3159f974de93f7ebd9d6 /src/lib/Server/Plugins
parent393f4bc548888ffbeb6e1484d9988a3a077db940 (diff)
downloadbcfg2-daae9eb16806e3cafdccbe1e3e316b880d276347.tar.gz
bcfg2-daae9eb16806e3cafdccbe1e3e316b880d276347.tar.bz2
bcfg2-daae9eb16806e3cafdccbe1e3e316b880d276347.zip
made packages.conf optional
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Packages.py6
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 """