summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Cfg.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-10-30 03:47:25 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-10-30 03:47:25 +0000
commit48f271d515c26d3984cae9088953946a49f3ea69 (patch)
treec72ccb34d811f62518fe873be99e29a195e8da1f /src/lib/Server/Plugins/Cfg.py
parent77cbb937c108869fbde5ab6fb132a8a05cd406a3 (diff)
downloadbcfg2-48f271d515c26d3984cae9088953946a49f3ea69.tar.gz
bcfg2-48f271d515c26d3984cae9088953946a49f3ea69.tar.bz2
bcfg2-48f271d515c26d3984cae9088953946a49f3ea69.zip
Deregister Cfg entries in case of overall deletion (Resolves Ticket #481)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3887 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Cfg.py')
-rw-r--r--src/lib/Server/Plugins/Cfg.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index f653f53f3..084bcdd4c 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -365,6 +365,12 @@ class Cfg(Bcfg2.Server.Plugin.Plugin):
elif action == 'deleted':
if self.entries.has_key(configfile):
self.entries[configfile].HandleEvent(event)
+ try:
+ os.stat(self.entries[configfile].repopath)
+ except:
+ logger.info("Removing service for ConfigFile %s" % \
+ self.entries[configfile].path)
+ del self.entries[configfile]
elif action in ['exists', 'endExist']:
pass
else: