summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
commit70a6b49821a3226f55e9716f32d802d06640cb89 (patch)
tree3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/smtplib.py
parentecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff)
downloadcpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 1af127f..daadee2 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -306,7 +306,7 @@ class SMTP:
def send(self, str):
"""Send `str' to the server."""
- if self.debuglevel > 0: print 'send:', `str`
+ if self.debuglevel > 0: print 'send:', repr(str)
if self.sock:
try:
self.sock.sendall(str)
@@ -345,7 +345,7 @@ class SMTP:
if line == '':
self.close()
raise SMTPServerDisconnected("Connection unexpectedly closed")
- if self.debuglevel > 0: print 'reply:', `line`
+ if self.debuglevel > 0: print 'reply:', repr(line)
resp.append(line[4:].strip())
code=line[:3]
# Check that the error code is syntactically correct.
@@ -666,7 +666,7 @@ class SMTP:
# Hmmm? what's this? -ddm
# self.esmtp_features['7bit']=""
if self.has_extn('size'):
- esmtp_opts.append("size=" + `len(msg)`)
+ esmtp_opts.append("size=%d" % len(msg))
for option in mail_options:
esmtp_opts.append(option)
@@ -727,7 +727,7 @@ if __name__ == '__main__':
if not line:
break
msg = msg + line
- print "Message length is " + `len(msg)`
+ print "Message length is %d" % len(msg)
server = SMTP('localhost')
server.set_debuglevel(1)