summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index a6f113c..066fd9c 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -168,14 +168,14 @@ def quoteaddr(addr):
Should be able to handle anything rfc822.parseaddr can handle.
"""
- m=None
+ m = (None, None)
try:
m=rfc822.parseaddr(addr)[1]
except AttributeError:
pass
- if not m:
+ if m == (None, None): # Indicates parse failure or AttributeError
#something weird here.. punt -ddm
- return addr
+ return "<%s>" % addr
else:
return "<%s>" % m