aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2022-11-04 12:16:54 +0100
committerMatěj Cepl <mcepl@cepl.eu>2022-11-04 12:16:54 +0100
commita79c15e0921200a4a89b352f0845bcc1d2628412 (patch)
tree03765707e550d8c8063f603eb8a41cb744dd4026
parent0efae60c88d21bcdca66d904cbc842b2e64ecfac (diff)
downloadpyg-a79c15e0921200a4a89b352f0845bcc1d2628412.tar.gz
Tiny cleanups
-rw-r--r--mail2news.py2
-rw-r--r--news2mail.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/mail2news.py b/mail2news.py
index d6d8658..29ef956 100644
--- a/mail2news.py
+++ b/mail2news.py
@@ -107,7 +107,7 @@ class mail2news(object):
self.message['In-Reply-To'])
# if found, keep first element that seems a Msg-ID.
- if(ref and len(ref)):
+ if (ref and len(ref)):
self.message['References'] = '%s\n' % ref[0]
except KeyError, message:
diff --git a/news2mail.py b/news2mail.py
index 78d0ae4..29aada4 100644
--- a/news2mail.py
+++ b/news2mail.py
@@ -24,11 +24,11 @@ normal (what pygs does) operations flow is:
"""
from collections import OrderedDict
import email
-from mail2news import VERSION, DESC
import smtplib
from socket import gethostbyaddr, gethostname
import sys
import time
+from mail2news import VERSION, DESC
# logging.basicConfig(level=logging.DEBUG)
@@ -121,8 +121,8 @@ class news2mail(object):
refs = self.message['References'].split()
self.message['In-Reply-To'] = refs[-1]
- except KeyError, message:
- print message
+ except KeyError as message:
+ print(message)
def __sortheads(self):
"""make list sorting heads, Received: From: To: Subject: first,