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
2ef747cb
Commit
2ef747cb
authored
Jun 04, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup in packaging: don’t unnecessarily instantiate exceptions
parent
35a4d01a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
Lib/packaging/pypi/dist.py
Lib/packaging/pypi/dist.py
+1
-1
Lib/packaging/pypi/simple.py
Lib/packaging/pypi/simple.py
+1
-1
Lib/packaging/run.py
Lib/packaging/run.py
+1
-1
Lib/packaging/tests/test_uninstall.py
Lib/packaging/tests/test_uninstall.py
+1
-1
No files found.
Lib/packaging/pypi/dist.py
View file @
2ef747cb
...
...
@@ -135,7 +135,7 @@ class ReleaseInfo(IndexReference):
not return one existing distribution.
"""
if
len
(
self
.
dists
)
==
0
:
raise
LookupError
()
raise
LookupError
if
dist_type
:
return
self
[
dist_type
]
if
prefer_source
:
...
...
Lib/packaging/pypi/simple.py
View file @
2ef747cb
...
...
@@ -189,7 +189,7 @@ class Crawler(BaseClient):
self._process_index_page(predicate.name)
if predicate.name.lower() not in self._projects:
raise ProjectNotFound
()
raise ProjectNotFound
releases = self._projects.get(predicate.name.lower())
releases.sort_releases(prefer_final=prefer_final)
...
...
Lib/packaging/run.py
View file @
2ef747cb
...
...
@@ -383,7 +383,7 @@ def _search(dispatcher, args, **kw):
"""
#opts = _parse_args(args[1:], '', ['simple', 'xmlrpc'])
# 1. what kind of index is requested ? (xmlrpc / simple)
raise
NotImplementedError
()
raise
NotImplementedError
actions
=
[
...
...
Lib/packaging/tests/test_uninstall.py
View file @
2ef747cb
...
...
@@ -111,7 +111,7 @@ class UninstallTestCase(support.TempdirManager,
old
=
os
.
rename
def
_rename
(
source
,
target
):
raise
OSError
()
raise
OSError
os
.
rename
=
_rename
try
:
...
...
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