diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-05-13 00:02:05 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-05-13 00:02:05 (GMT) |
commit | fa6bdc6d8651e8240f2964ea628a188fb2d594c6 (patch) | |
tree | d4e7faa49c1ffe7e7934520ac371a84996897371 /Lib/urllib | |
parent | 159ae41da68ff1f1d85ed66fa6410bd9ba62ed5b (diff) | |
parent | 901a278861d070e55b426f8fb67bb83707da96d2 (diff) | |
download | cpython-fa6bdc6d8651e8240f2964ea628a188fb2d594c6.zip cpython-fa6bdc6d8651e8240f2964ea628a188fb2d594c6.tar.gz cpython-fa6bdc6d8651e8240f2964ea628a188fb2d594c6.tar.bz2 |
merge 3.3
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index fb86335..3258102 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -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 |