Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
55bfb7d8
Commit
55bfb7d8
authored
Jun 15, 2020
by
Jason R. Coombs
Committed by
GitHub
Jun 15, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2189 from cool-RR/2020-06-11-raise-from
Fix exception causes in package_index.py
parents
3955acbb
65887607
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
setuptools/package_index.py
setuptools/package_index.py
+6
-6
No files found.
setuptools/package_index.py
View file @
55bfb7d8
...
...
@@ -53,10 +53,10 @@ user_agent = _tmpl.format(
def parse_requirement_arg(spec):
try:
return Requirement.parse(spec)
except ValueError:
except ValueError
as e
:
raise DistutilsError(
"Not a URL, existing file, or requirement spec: %r" % (spec,)
)
)
from e
def parse_bdist_wininst(name):
...
...
@@ -772,7 +772,7 @@ class PackageIndex(Environment):
if warning:
self.warn(warning, msg)
else:
raise DistutilsError('%s %s' % (url, msg))
raise DistutilsError('%s %s' % (url, msg))
from v
except urllib.error.HTTPError as v:
return v
except urllib.error.URLError as v:
...
...
@@ -780,7 +780,7 @@ class PackageIndex(Environment):
self.warn(warning, v.reason)
else:
raise DistutilsError("Download error for %s: %s"
% (url, v.reason))
% (url, v.reason))
from v
except http_client.BadStatusLine as v:
if warning:
self.warn(warning, v.line)
...
...
@@ -789,13 +789,13 @@ class PackageIndex(Environment):
'%s returned a bad status line. The server might be '
'down, %s' %
(url, v.line)
)
)
from v
except (http_client.HTTPException, socket.error) as v:
if warning:
self.warn(warning, v)
else:
raise DistutilsError("Download error for %s: %s"
% (url, v))
% (url, v))
from v
def _download_url(self, scheme, url, tmpdir):
# Determine download filename
...
...
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