mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
merge 3.3
This commit is contained in:
commit
fa6bdc6d86
1 changed files with 2 additions and 2 deletions
|
@ -2324,7 +2324,7 @@ class ftpwrapper:
|
|||
conn, retrlen = self.ftp.ntransfercmd(cmd)
|
||||
except ftplib.error_perm as reason:
|
||||
if str(reason)[:3] != '550':
|
||||
raise URLError('ftp error: %d' % reason).with_traceback(
|
||||
raise URLError('ftp error: %r' % reason).with_traceback(
|
||||
sys.exc_info()[2])
|
||||
if not conn:
|
||||
# Set transfer mode to ASCII!
|
||||
|
@ -2336,7 +2336,7 @@ class ftpwrapper:
|
|||
try:
|
||||
self.ftp.cwd(file)
|
||||
except ftplib.error_perm as reason:
|
||||
raise URLError('ftp error: %d' % reason) from reason
|
||||
raise URLError('ftp error: %r' % reason) from reason
|
||||
finally:
|
||||
self.ftp.cwd(pwd)
|
||||
cmd = 'LIST ' + file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue