Skip to content

Commit

Permalink
Fixed check for the signature source location.
Browse files Browse the repository at this point in the history
closes pulp#617
  • Loading branch information
ipanova committed Mar 8, 2022
1 parent b9f5880 commit d156fd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/617.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed check for the signature source location.
10 changes: 6 additions & 4 deletions pulp_container/app/tasks/sync_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ async def get_signature_source(self):

registry_v2_url = urljoin(self.remote.url, "v2")
extension_check_downloader = self.remote.get_noauth_downloader(url=registry_v2_url)
response_headers = {}
try:
await extension_check_downloader.run()
result = await extension_check_downloader.run()
response_headers = result.headers
except aiohttp.client_exceptions.ClientResponseError as exc:
if exc.status in [200, 401]:
if exc.status == 401:
response_headers = dict(exc.headers)
if response_headers.get(SIGNATURE_HEADER) == "1":
return SIGNATURE_SOURCE.API_EXTENSION
if response_headers.get(SIGNATURE_HEADER) == "1":
return SIGNATURE_SOURCE.API_EXTENSION

tag_list = []
tag_dcs = []
Expand Down

0 comments on commit d156fd5

Please sign in to comment.