summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-25 13:41:48 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-25 13:44:21 -0500
commit4568c44372c99ba809826e016680da9b881bd8e8 (patch)
treee161defae015b0d4039c542942b58ffd3acccd18 /tools
parentc4528303121d1c33244d147e97c29669ac30c01b (diff)
downloadbcfg2-4568c44372c99ba809826e016680da9b881bd8e8.tar.gz
bcfg2-4568c44372c99ba809826e016680da9b881bd8e8.tar.bz2
bcfg2-4568c44372c99ba809826e016680da9b881bd8e8.zip
Core: properly handle Ctrl-C
Diffstat (limited to 'tools')
-rwxr-xr-xtools/bcfg2-profile-templates.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/tools/bcfg2-profile-templates.py b/tools/bcfg2-profile-templates.py
index cc7a1a3d8..3cd3786f9 100755
--- a/tools/bcfg2-profile-templates.py
+++ b/tools/bcfg2-profile-templates.py
@@ -4,7 +4,6 @@
import os
import sys
import time
-import signal
import logging
import operator
import Bcfg2.Logger
@@ -13,19 +12,6 @@ import Bcfg2.Server.Core
LOGGER = None
-def get_sigint_handler(core):
- """ Get a function that handles SIGINT/Ctrl-C by shutting down the
- core and exiting properly."""
-
- def hdlr(sig, frame): # pylint: disable=W0613
- """ Handle SIGINT/Ctrl-C by shutting down the core and exiting
- properly. """
- core.shutdown()
- os._exit(1) # pylint: disable=W0212
-
- return hdlr
-
-
def main():
optinfo = \
dict(client=Bcfg2.Options.Option("Benchmark templates for one client",
@@ -53,7 +39,6 @@ def main():
logger = logging.getLogger(sys.argv[0])
core = Bcfg2.Server.Core.BaseCore(setup)
- signal.signal(signal.SIGINT, get_sigint_handler(core))
logger.info("Bcfg2 server core loaded")
core.fam.handle_events_in_interval(0.1)
logger.debug("Repository events processed")