summaryrefslogtreecommitdiff
path: root/cloudinit/signal_handler.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/signal_handler.py')
-rw-r--r--cloudinit/signal_handler.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/cloudinit/signal_handler.py b/cloudinit/signal_handler.py
index 9272d22d..382c4616 100644
--- a/cloudinit/signal_handler.py
+++ b/cloudinit/signal_handler.py
@@ -20,11 +20,11 @@ LOG = logging.getLogger(__name__)
BACK_FRAME_TRACE_DEPTH = 3
EXIT_FOR = {
- signal.SIGINT: ('Cloud-init %(version)s received SIGINT, exiting...', 1),
- signal.SIGTERM: ('Cloud-init %(version)s received SIGTERM, exiting...', 1),
+ signal.SIGINT: ("Cloud-init %(version)s received SIGINT, exiting...", 1),
+ signal.SIGTERM: ("Cloud-init %(version)s received SIGTERM, exiting...", 1),
# Can't be caught...
# signal.SIGKILL: ('Cloud-init killed, exiting...', 1),
- signal.SIGABRT: ('Cloud-init %(version)s received SIGABRT, exiting...', 1),
+ signal.SIGABRT: ("Cloud-init %(version)s received SIGABRT, exiting...", 1),
}
@@ -41,12 +41,11 @@ def _pprint_frame(frame, depth, max_depth, contents):
def _handle_exit(signum, frame):
(msg, rc) = EXIT_FOR[signum]
- msg = msg % ({'version': vr.version_string()})
+ msg = msg % ({"version": vr.version_string()})
contents = StringIO()
contents.write("%s\n" % (msg))
_pprint_frame(frame, 1, BACK_FRAME_TRACE_DEPTH, contents)
- util.multi_log(contents.getvalue(),
- console=True, stderr=False, log=LOG)
+ util.multi_log(contents.getvalue(), console=True, stderr=False, log=LOG)
sys.exit(rc)
@@ -57,4 +56,5 @@ def attach_handlers():
sigs_attached += len(EXIT_FOR)
return sigs_attached
+
# vi: ts=4 expandtab