Skip to content

Commit 6e00df6

Browse files
author
Carl Meyer
committed
bpo-43564: preserve original error in args of FTP URLError
1 parent 148bc05 commit 6e00df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/urllib/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ def ftp_open(self, req):
15791579
headers = email.message_from_string(headers)
15801580
return addinfourl(fp, headers, req.full_url)
15811581
except ftplib.all_errors as exp:
1582-
exc = URLError('ftp error: %r' % exp)
1582+
exc = URLError(exp)
15831583
raise exc.with_traceback(sys.exc_info()[2])
15841584

15851585
def connect_ftp(self, user, passwd, host, port, dirs, timeout):

0 commit comments

Comments
 (0)