From bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf Mon Sep 17 00:00:00 2001 From: James Falcon Date: Wed, 15 Dec 2021 20:16:38 -0600 Subject: Adopt Black and isort (SC-700) (#1157) Applied Black and isort, fixed any linting issues, updated tox.ini and CI. --- cloudinit/signal_handler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cloudinit/signal_handler.py') 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 -- cgit v1.2.3