Commit 6bd781c6 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

fix httpx

parent 7b2b629d
Pipeline #14238 failed with stage
in 7 minutes and 43 seconds
...@@ -88,7 +88,7 @@ class Forge(Links, NamedModel): ...@@ -88,7 +88,7 @@ class Forge(Links, NamedModel):
logger.debug(f'requesting api {self} {url}, page {page}') logger.debug(f'requesting api {self} {url}, page {page}')
try: try:
return httpx.get(self.api_url() + url, {'page': page}, verify=self.verify, headers=self.headers()) return httpx.get(self.api_url() + url, {'page': page}, verify=self.verify, headers=self.headers())
except httpx.exceptions.ConnectionError: except httpx.HTTPError:
logger.error(f'requesting api {self} {url}, page {page} - SECOND TRY') logger.error(f'requesting api {self} {url}, page {page} - SECOND TRY')
return httpx.get(self.api_url() + url, {'page': page}, verify=self.verify, headers=self.headers()) return httpx.get(self.api_url() + url, {'page': page}, verify=self.verify, headers=self.headers())
...@@ -494,7 +494,7 @@ class Repo(TimeStampedModel): ...@@ -494,7 +494,7 @@ class Repo(TimeStampedModel):
return httpx.get(self.api_url() + url, {'page': page}, return httpx.get(self.api_url() + url, {'page': page},
verify=self.forge.verify, verify=self.forge.verify,
headers=self.forge.headers()) headers=self.forge.headers())
except httpx.exceptions.ConnectionError: except httpx.HTTPError:
logger.error(f'requesting api {self.forge} {self.namespace} {self} {url}, page {page} - SECOND TRY') logger.error(f'requesting api {self.forge} {self.namespace} {self} {url}, page {page} - SECOND TRY')
return httpx.get(self.api_url() + url, {'page': page}, return httpx.get(self.api_url() + url, {'page': page},
verify=self.forge.verify, verify=self.forge.verify,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment