summaryrefslogtreecommitdiffstats
path: root/Lib/nntplib.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/nntplib.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/nntplib.py')
-rw-r--r--Lib/nntplib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 6299ba2..83544b8 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -175,7 +175,7 @@ class NNTP:
If the response code is 200, posting is allowed;
if it 201, posting is not allowed."""
- if self.debugging: print '*welcome*', `self.welcome`
+ if self.debugging: print '*welcome*', repr(self.welcome)
return self.welcome
def set_debuglevel(self, level):
@@ -190,12 +190,12 @@ class NNTP:
def putline(self, line):
"""Internal: send one line to the server, appending CRLF."""
line = line + CRLF
- if self.debugging > 1: print '*put*', `line`
+ if self.debugging > 1: print '*put*', repr(line)
self.sock.sendall(line)
def putcmd(self, line):
"""Internal: send one command to the server (through putline())."""
- if self.debugging: print '*cmd*', `line`
+ if self.debugging: print '*cmd*', repr(line)
self.putline(line)
def getline(self):
@@ -203,7 +203,7 @@ class NNTP:
Raise EOFError if the connection is closed."""
line = self.file.readline()
if self.debugging > 1:
- print '*get*', `line`
+ print '*get*', repr(line)
if not line: raise EOFError
if line[-2:] == CRLF: line = line[:-2]
elif line[-1:] in CRLF: line = line[:-1]
@@ -213,7 +213,7 @@ class NNTP:
"""Internal: get a response from the server.
Raise various errors if the response indicates an error."""
resp = self.getline()
- if self.debugging: print '*resp*', `resp`
+ if self.debugging: print '*resp*', repr(resp)
c = resp[:1]
if c == '4':
raise NNTPTemporaryError(resp)