summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.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/ftplib.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/ftplib.py')
-rw-r--r--Lib/ftplib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index d67a0aa..9486918 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -161,7 +161,7 @@ class FTP:
while i > 5 and s[i-1] in '\r\n':
i = i-1
s = s[:5] + '*'*(i-5) + s[i:]
- return `s`
+ return repr(s)
# Internal: send one line to the server, appending CRLF
def putline(self, line):
@@ -250,7 +250,7 @@ class FTP:
port number.
'''
hbytes = host.split('.')
- pbytes = [`port/256`, `port%256`]
+ pbytes = [repr(port/256), repr(port%256)]
bytes = hbytes + pbytes
cmd = 'PORT ' + ','.join(bytes)
return self.voidcmd(cmd)
@@ -264,7 +264,7 @@ class FTP:
af = 2
if af == 0:
raise error_proto, 'unsupported address family'
- fields = ['', `af`, host, `port`, '']
+ fields = ['', repr(af), host, repr(port), '']
cmd = 'EPRT ' + '|'.join(fields)
return self.voidcmd(cmd)
@@ -397,7 +397,7 @@ class FTP:
fp = conn.makefile('rb')
while 1:
line = fp.readline()
- if self.debugging > 2: print '*retr*', `line`
+ if self.debugging > 2: print '*retr*', repr(line)
if not line:
break
if line[-2:] == CRLF: