From 3192b0e2ae05a8e0ce951272a7e99ea571587c2f Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 23 Oct 2017 09:54:21 +0200 Subject: Don't use .format() in logging --- train_bogofilter | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/train_bogofilter b/train_bogofilter index 00f444d..45d7c7f 100755 --- a/train_bogofilter +++ b/train_bogofilter @@ -15,11 +15,11 @@ def process_folder(proc_fld_name, bogofilter_param, end_fld_name): client.select(proc_fld_name) _, resp = client.search(None, "ALL") messages = resp[0].split() - logging.debug('messages = {0}'.format(messages)) + logging.debug('messages = %s', messages) proc_msg_count = 0 for msgId in messages: - logging.debug('msgId = {0}'.format(msgId)) + logging.debug('msgId = %s', msgId) typ, msg_data = client.fetch(msgId, '(RFC822)') msg = hparser.parsestr(msg_data[0][1]) @@ -61,8 +61,8 @@ server = config.get("imap-training", "server") client = imaplib.IMAP4_SSL(server) client.login(login, password) -for box in [('Spam', 's', 'Deleted Items'), ('Ham', 'n', 'INBOX')]: - logging.debug('box = {0}'.format(box)) +for box in [('Junk', 's', 'Deleted Items'), ('Ham', 'n', 'INBOX')]: + logging.debug('box = %s', box) processedCounter += process_folder(box[0], box[1], box[2]) client.logout() -- cgit