summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-10-30 01:58:38 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2014-10-30 03:42:35 +0100
commite2bdcfa904b7858f369e95cced1a6b2e93fa5a10 (patch)
tree36777d68b59a21347d17993eb1d88610920b8be5
parent31217590131874945ac52cab6256c332ab6571a4 (diff)
downloadbcfg2-e2bdcfa904b7858f369e95cced1a6b2e93fa5a10.tar.gz
bcfg2-e2bdcfa904b7858f369e95cced1a6b2e93fa5a10.tar.bz2
bcfg2-e2bdcfa904b7858f369e95cced1a6b2e93fa5a10.zip
Lint: handle KeyboardInterupt during fam events
If a KeyboardInterupt occurs during block_for_fam_events core.shutdown() has to be called. block_For_fam_events will start the fam thread and if shutdown is not called the main thread will stop on an exception and python will wait until the fam thread stops (never).
-rw-r--r--src/lib/Bcfg2/Server/Lint/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/__init__.py b/src/lib/Bcfg2/Server/Lint/__init__.py
index 9b3e6ece2..1358a46fb 100644
--- a/src/lib/Bcfg2/Server/Lint/__init__.py
+++ b/src/lib/Bcfg2/Server/Lint/__init__.py
@@ -428,9 +428,9 @@ class CLI(object):
def run_server_plugins(self):
""" run plugins that require a running server to run """
core = Bcfg2.Server.Core.Core()
- core.load_plugins()
- core.block_for_fam_events(handle_events=True)
try:
+ core.load_plugins()
+ core.block_for_fam_events(handle_events=True)
self.logger.debug("Running server plugins: %s" %
[p.__name__ for p in self.serverplugins])
for plugin in self.serverplugins: