Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
ec89ac45
Unverified
Commit
ec89ac45
authored
May 27, 2022
by
Arun Babu Neelicattu
Committed by
GitHub
May 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pypi: do not raise exception on 404 (#5698)
parent
9e4fb44b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/poetry/repositories/pypi_repository.py
+7
-3
No files found.
src/poetry/repositories/pypi_repository.py
View file @
ec89ac45
...
...
@@ -243,14 +243,18 @@ class PyPiRepository(HTTPRepository):
def
_get
(
self
,
endpoint
:
str
)
->
dict
[
str
,
Any
]
|
None
:
try
:
json_response
=
self
.
session
.
get
(
self
.
_base_url
+
endpoint
)
json_response
=
self
.
session
.
get
(
self
.
_base_url
+
endpoint
,
raise_for_status
=
False
)
except
requests
.
exceptions
.
TooManyRedirects
:
# Cache control redirect loop.
# We try to remove the cache and try again
self
.
session
.
delete_cache
(
self
.
_base_url
+
endpoint
)
json_response
=
self
.
session
.
get
(
self
.
_base_url
+
endpoint
)
json_response
=
self
.
session
.
get
(
self
.
_base_url
+
endpoint
,
raise_for_status
=
False
)
if
json_response
.
status_code
==
404
:
if
json_response
.
status_code
!=
200
:
return
None
json
:
dict
[
str
,
Any
]
=
json_response
.
json
()
...
...
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