Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
901a2788
Commit
901a2788
authored
May 12, 2013
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use correct format code for exceptions
parent
0ab18e4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/urllib/request.py
Lib/urllib/request.py
+2
-2
No files found.
Lib/urllib/request.py
View file @
901a2788
...
...
@@ -2294,7 +2294,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!
...
...
@@ -2306,7 +2306,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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment