diff options
| -rw-r--r-- | Mailman/Bouncers/BouncerAPI.py | 2 | ||||
| -rw-r--r-- | Mailman/Handlers/Decorate.py | 3 | ||||
| -rw-r--r-- | Mailman/Handlers/Hold.py | 2 | ||||
| -rw-r--r-- | Mailman/Handlers/Sendmail.py | 10 | ||||
| -rw-r--r-- | Mailman/Handlers/ToUsenet.py | 2 | ||||
| -rw-r--r-- | Mailman/Queue/CommandRunner.py | 2 | ||||
| -rw-r--r-- | Mailman/Queue/IncomingRunner.py | 3 | ||||
| -rw-r--r-- | Mailman/Queue/NewsRunner.py | 10 | ||||
| -rw-r--r-- | Mailman/Queue/Runner.py | 8 | ||||
| -rw-r--r-- | Mailman/Queue/Switchboard.py | 2 |
10 files changed, 22 insertions, 22 deletions
diff --git a/Mailman/Bouncers/BouncerAPI.py b/Mailman/Bouncers/BouncerAPI.py index b6a4fc952..5d89cc362 100644 --- a/Mailman/Bouncers/BouncerAPI.py +++ b/Mailman/Bouncers/BouncerAPI.py @@ -62,7 +62,7 @@ def ScanMessages(mlist, msg, testing=0): try: mlist.RegisterBounce(addr, msg) except Exception, e: - syslog('error', 'Bouncer exception: %s' % e) + syslog('error', 'Bouncer exception: %s', e) s = StringIO() traceback.print_exc(file=s) syslog('error', s.getvalue()) diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py index 8a2a30f9e..90a3cd509 100644 --- a/Mailman/Handlers/Decorate.py +++ b/Mailman/Handlers/Decorate.py @@ -76,8 +76,7 @@ def decorate(mlist, template, what): try: text = (template % d).replace('\r\n', '\n') except ValueError, e: - syslog('error', 'Exception while calculating %s:\n%s' % - (what, e)) + syslog('error', 'Exception while calculating %s:\n%s', what, e) what = what.upper() text = _('[INVALID %(what)s]') return text diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py index d9a57db82..a610c822b 100644 --- a/Mailman/Handlers/Hold.py +++ b/Mailman/Handlers/Hold.py @@ -279,7 +279,7 @@ def hold_for_approval(mlist, msg, msgdata, exc): finally: i18n.set_translation(otranslation) # Log the held message - syslog('vette', '%s post from %s held: %s' % (listname, sender, reason)) + syslog('vette', '%s post from %s held: %s', listname, sender, reason) # raise the specific MessageHeld exception to exit out of the message # delivery pipeline raise exc diff --git a/Mailman/Handlers/Sendmail.py b/Mailman/Handlers/Sendmail.py index 235a2b0e1..fbec8c69a 100644 --- a/Mailman/Handlers/Sendmail.py +++ b/Mailman/Handlers/Sendmail.py @@ -87,15 +87,15 @@ def process(mlist, msg, msgdata): status = fp.close() if status: errcode = (status & 0xff00) >> 8 - syslog('post', 'post to %s from %s, size=%d, failure=%d' % - (mlist.internal_name(), msg.get_sender(), - len(msg.body), errcode)) + syslog('post', 'post to %s from %s, size=%d, failure=%d', + mlist.internal_name(), msg.get_sender(), + len(msg.body), errcode) # TBD: can we do better than this? What if only one recipient out # of the entire chunk failed? failedrecips.append(chunk) # Log the successful post - syslog('post', 'post to %s from %s, size=%d, success' % - (mlist.internal_name(), msg.get_sender(), len(msg.body))) + syslog('post', 'post to %s from %s, size=%d, success', + mlist.internal_name(), msg.get_sender(), len(msg.body)) if failedrecips: msgdata['recips'] = failedrecips raise Errors.SomeRecipientsFailed diff --git a/Mailman/Handlers/ToUsenet.py b/Mailman/Handlers/ToUsenet.py index d209e3c7c..41482872b 100644 --- a/Mailman/Handlers/ToUsenet.py +++ b/Mailman/Handlers/ToUsenet.py @@ -35,7 +35,7 @@ def process(mlist, msg, msgdata): if not mlist.nntp_host: error.append('no NNTP host') if error: - syslog('error', 'NNTP gateway improperly configured: ' + + syslog('error', 'NNTP gateway improperly configured: %s', COMMASPACE.join(error)) return # Put the message in the news runner's queue diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index e4ece34b9..461347581 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -122,7 +122,7 @@ class CommandRunner(Runner): else: senderlhs = sender if senderlhs in mm_cfg.LIKELY_BOUNCE_SENDERS: - syslog('error', 'bounce loop detected from: %s' % sender) + syslog('error', 'bounce loop detected from: %s', sender) return # Any messages to the owner address must have Errors-To: set # back to the owners address so bounce loops can be broken, as diff --git a/Mailman/Queue/IncomingRunner.py b/Mailman/Queue/IncomingRunner.py index 2a051eebb..2cb349be5 100644 --- a/Mailman/Queue/IncomingRunner.py +++ b/Mailman/Queue/IncomingRunner.py @@ -136,8 +136,7 @@ class IncomingRunner(Runner): func(mlist, msg, msgdata) # Failsafe -- a child may have leaked through. if pid <> os.getpid(): - syslog('error', 'child process leaked through: %s' % - modname) + syslog('error', 'child process leaked thru: %s', modname) os._exit(1) except Errors.DiscardMessage: # Throw the message away; we need do nothing else with it. diff --git a/Mailman/Queue/NewsRunner.py b/Mailman/Queue/NewsRunner.py index c27435527..fa376feea 100644 --- a/Mailman/Queue/NewsRunner.py +++ b/Mailman/Queue/NewsRunner.py @@ -21,6 +21,7 @@ import time import re import socket import nntplib + from mimelib.MsgReader import MsgReader from mimelib.address import getaddresses @@ -28,6 +29,7 @@ COMMASPACE = ', ' from Mailman import mm_cfg from Mailman.Queue.Runner import Runner +from Mailman.Logging.Syslog import syslog from Mailman.pythonlib.StringIO import StringIO # Matches our Mailman crafted Message-IDs @@ -55,12 +57,12 @@ class NewsRunner(Runner): conn.post(fp) except nntplib.error_temp, e: syslog('error', - '(NNTPDirect) NNTP error for list "%s": %s' % - (mlist.internal_name(), e)) + '(NNTPDirect) NNTP error for list "%s": %s', + mlist.internal_name(), e) except socket.error, e: syslog('error', - '(NNTPDirect) socket error for list "%s": %s' % - (mlist.internal_name(), e)) + '(NNTPDirect) socket error for list "%s": %s', + mlist.internal_name(), e) finally: if conn: conn.quit() diff --git a/Mailman/Queue/Runner.py b/Mailman/Queue/Runner.py index 6136b0ca2..29c78c911 100644 --- a/Mailman/Queue/Runner.py +++ b/Mailman/Queue/Runner.py @@ -85,7 +85,7 @@ class Runner: # this filebase entry. dequeue() will automatically unlink the # other file, but we should log an error message for diagnostics. if msg is None or msgdata is None: - syslog('error', 'lost data files for filebase: %s' % filebase) + syslog('error', 'lost data files for filebase: %s', filebase) else: # Now that we've dequeued the message, we want to be # incredibly anal about making sure that no uncaught exception @@ -121,7 +121,7 @@ class Runner: mlist = self._open_list(listname) if not mlist: syslog('error', - 'Dequeuing message destined for missing list: %s' % + 'Dequeuing message destined for missing list: %s', listname) self._shunt.enqueue(msg, msgdata) return @@ -171,12 +171,12 @@ class Runner: if self._cachelists: self._listcache[listname] = mlist except Errors.MMListError, e: - syslog('error', 'error opening list: %s\n%s' % (listname, e)) + syslog('error', 'error opening list: %s\n%s', listname, e) return None return mlist def _log(self, exc): - syslog('error', 'Uncaught runner exception: %s' % exc) + syslog('error', 'Uncaught runner exception: %s', exc) s = StringIO() traceback.print_exc(file=s) syslog('error', s.getvalue()) diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py index 831600da4..54ba5d275 100644 --- a/Mailman/Queue/Switchboard.py +++ b/Mailman/Queue/Switchboard.py @@ -274,6 +274,6 @@ elif mm_cfg.METADATA_FORMAT == mm_cfg.METAFMT_BSDDB_NATIVE: elif mm_cfg.METADATA_FORMAT == mm_cfg.METAFMT_ASCII: Switchboard = ASCIISwitchboard else: - syslog('error', 'Undefined metadata format: %d (using marshals)' % + syslog('error', 'Undefined metadata format: %d (using marshals)', mm_cfg.METADATA_FORMAT) Switchboard = MarshalSwitchboard |
