From e2bdcfa904b7858f369e95cced1a6b2e93fa5a10 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 30 Oct 2014 01:58:38 +0100 Subject: 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). --- src/lib/Bcfg2/Server/Lint/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/Bcfg2/Server/Lint/__init__.py') 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: -- cgit v1.2.3-1-g7c22