From f00b94f18e1d82d1488cbcee6053f03423bc2f49 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 22 Jul 2017 03:02:05 +0000 Subject: Convert to click for CLI options --- src/mailman/core/runner.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mailman/core/runner.py') diff --git a/src/mailman/core/runner.py b/src/mailman/core/runner.py index 707ad5e07..2f7e991dc 100644 --- a/src/mailman/core/runner.py +++ b/src/mailman/core/runner.py @@ -86,7 +86,7 @@ class Runner: def __repr__(self): return '<{} at {:#x}>'.format(self.__class__.__name__, id(self)) - def signal_handler(self, signum, frame): + def signal_handler(self, signum, frame): # pragma: nocover signame = { signal.SIGTERM: 'SIGTERM', signal.SIGINT: 'SIGINT', @@ -94,11 +94,13 @@ class Runner: }.get(signum, signum) if signum == signal.SIGHUP: reopen() - rlog.info('%s runner caught SIGHUP. Reopening logs.', self.name) + rlog.info('{} runner caught SIGHUP. Reopening logs.'.format( + self.name)) elif signum in (signal.SIGTERM, signal.SIGINT, signal.SIGUSR1): self.stop() self.status = signum - rlog.info('%s runner caught %s. Stopping.', self.name, signame) + rlog.info('{} runner caught {}. Stopping.'.format( + self.name, signame)) # As of Python 3.5, PEP 475 gets in our way. Runners with long # time.sleep()'s in their _snooze() method (e.g. the retry runner) # will have their system call implemented time.sleep() -- cgit v1.2.3-70-g09d2