summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-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 """